JC Web Concepts

My Switch to Neovim

Image of how my Neovim looks like

For the longest time I have been hopping from editor to editor. I have used Notepad++, Sublime Text, Atom, and recently Visual Studio Code. I have known so many people who keep telling me to try and use Vim. They say you will love it. So, for the past 6 months I have been using Neovim. It has been a long challenge to not go back, but it is growing on me as an editor. Now I am not here to tell you that Vim is better than any other editor. I am not here to tell you that you should use it. I want to tell you why I enjoy using it and then you can make your own decision.

Neovim

So the hardest part for me in using vim/neovim was learning the keyboard shortcuts. If you are not a keyboard shortcut person, then using Vim is out of the question. I like to use them but never train myself in them so this is one of the first things I had to do. I had to start memorizing them. The problem I ran into was there was just way too many. Then a friend of mine told me that instead of just opening a help document and learning them all, he told me to learn a new command a week. He told me that when I find a new command to learn, write it on a sticky note and put it on my monitor. So that is what I did, I found that I was hitting w or e to get to the beginning or ending of a line. So the first command set that I need helping getting into muscle memory was Shift+I and Shift+A.

So as I was watching others on YouTube and reading articles, they recommend learning h,j,k,land to do so they recommended, https://vim-adventures.com/. So I did that and learned to become a master of those keys. Man did that save my fingers so much. So then I had to train myself to not use the arrow keys to move. To do this, in my vimrc I put in a snippet to echo “Stop being stupid!”, thanks Nick Nisi.

The other big mistake I made when I first started to learn vim, was to use someone elses vimrc verbatim. You should never ever do this, ever. You should start off with an empty or bare essential vimrc. Then when things are not what you need it to be, then add it to your vimrc. When I first started I did this and man it made things so confusing. Half of the plugins, I never used, others caused weird behavior that I was not expecting. So after awhile. So soon I ended up with my Neovim/vim look like this:

Image of how my Neovim looks like

So if you want to look over my vimrc, you may do so but remember, don’t just copy it and use it as your own as it may not be what you need. Take pieces of it. Any questions, please comment below and I will try to answer them

Dotfiles

Setting up a new computer can be a tedious and tiresome process. I am not the person that has an exact image of my machine, so when things go wrong I just load that image. I would never have something like that because when I am ready to re-install, I want to start as clean as possible.

At some point I went ahead and starting backing up my dotfiles in Github. This starting to make things easier but it was still a problem. I still had to install all the apps I needed to do things. Then the problem was, what and how do I install these things again. So then I watched a video by another developer by the name of Nick Nisi. He built a script to not only get his dotfiles but also it started moving things to where they need to be. Take a look at the video below where I talk a little more about this topic. You can view my current dotfiles here.

Xdebug

As an automation developer, I have learned how to write code in Java. When I am having an issue, one of the nice things that you can do is debug your code, line by line. For the longest I had wished that something like this existed in PHP. I have come to find out that you can actually debug code, like I do in Java. This is such a helpful task because I do not have to waste time using var_dump and such on variables or results. In your apache/php server you need to install and or enable something called Xdebug . I will work on a tutorial on how to use xdebug while writing code in Sublime Text 2. So keep an eye out on my blog and or YouTube channel for this tutorial.

Terminal IDE for Android

I just purchased a Samsung Galaxy Tab 2 10.1 and I am loving it. So since I am new I have been looking around for some good apps to use. I think I found one in an app called Terminal IDE . This application brings a developmenting environment with Git support that I can do some web development work with it. I am not going to say I can replace my desktop or a laptop, but you can do some quick fixes with it. A good accessory to get with it is the Logitech bluetooth keyboard . You will have to let me know in the comments below on what you think about this nice application.

Web Development on Android

One of my latest purchases was an Android Samsung Galaxy Tablet 10.1. Unfortunately I have to get a replacement but it happens. So getting back on track I am new to an Android device. I found a great app on the Google Play Store, called Terminal IDE . This app brings you access to the terminal and you have some nice commands to work with. A few to name is, Git, VIM, find, etc… Once I get my tablet back I will do a video demo to show it off.

Adobe Creative Cloud

Well this past week Adobe has launched their new cloud service called, Adobe Creative Cloud . As of launch they are charging a monthly fee of $49.99 and I believe it is going to be well worth it. I will gladly pay that amount to get all of the Adobe products for both Windows and Mac. So lets say you wanted to buy a master collection copy of Adobe for both OS’es, you would be paying 2599.99 per OS. Yep that would cost you $5199.98 and that is for the current version. When a new version comes out you can pay and upgrade rate but still pay.

So with doing some simple math here, 5199.98/49.99=104. That would be almost 9 years to get what I would have paid for one version. I think I will gladly take that. I will let you guys decide but right now I think that is pretty much a steal. Thoughts?

Using Git for SVN

So I have switched from SVN to Git and I am very happy about it. When I am at work I am stuck using SVN and I hate it. So I learned about a command that git has called git svn. It allows me to clone an SVN repo and locally use Git for it. I can make my commits and keep things versioned via Git. When I am done I can then commit it to the SVN repo and nobody would know I used Git instead of SVN. What is nice is it will commit all the changes, not just one massive one. I have yet to run into and issue but that’s ok if I do. So if you are a Git user stuck in an SVN world, then this is the way to save yourself. Let me show you an example of how to use this.

git svn clone "urlToSVNrepository"
git svn clone "http://svn.google.com/sampleTest"

git svn clone "urlToSVNrepository" -T trunk -b branches -t tags

git svn clone "http://svn.google.com/sampleTest" -T trunk -b branches -t tags

So now you have your svn project using git, which is nice. What also is nice is your project no longer has a bunch of .svn folders like you see in SVN land. That should be one of many things that will make you want to do this. I will make tutorial video on this soon so stay tuned if you are interested.

Setting Up a Git Server

Version control is something that a lot of developers use. I have been using SVN for the longest time and ignoring Git. I found it confusing and I just left it alone. I did the same thing before I started to use SVN. I thought I would have learned by now. So take a look at the video below and I will also put the steps at the end of the post.

On where the master git server will be hosted

mkdir /home/git/somerepo.git
cd /home/git/somerepo.git
git --bare init

Now lets go to your computer

mkdir somerepo.git
cd somerepo.git
git init
**Create a README file or you can type:
touch README
git add .
git commit -m "Some message"
git remote add origin username@yourservername:somerepo.git
git push origin master

Now this setup is just using the users that are already on the server. You can setup that you do not need to type in password. You can create just a git user. I hope that this tutorial has helped.