Tag Archives: editor

VIM buffer commands

Commands from vim buffers can take long to get into our brains. Practice will lead to perfection… eventually.

Here are some tips to get them into memory faster:

Editor commands:    
  :e filename - Edit a file an existing file in a new buffer
  :sp filename - Open a file in a new buffer and split window
  :vs or :vsp Open a file in a new buffer and split window vertically 
  ctrl+ws - Split window to work in two places of the same file
  ctrl+wv - Split window vertically (and work in the same file)

Navigation commands:
  :bnext (or :bn) - go to next buffer
  :bprev (of :bp) - go to previous buffer
  :bd - delete a buffer (close a file)
  ctrl+ww - switch between windows
  ctrl+wq - Quit a window

With pictures to decorate this post:


Open up a new file called ‘example1’


With ‘example1’ open, type in ‘:vs example2’ to vertically split the window and edit a new file ‘example2‘. It will open up a new buffer to the left of ‘example1’


From the ‘example2’ buffer, type in ‘:sp example3’ to horizontally split the screen and edit a new file ‘example3‘. It will open a new buffer above ‘example2’


All three buffers displayed. Use CTRL-W+W to cycle through them.


Reference: http://www.worldtimzone.com/res/vi.html


Hide .gitignore files in Atom Tree view

I have been using Atom as my coding editor for almost a year now. As a Python developer, the *.pyc files often bugged me whenever I ran my code.

Adding those files in the .gitgnore file did not prevent them to show up in the tree view and hiding them from the Atom menus was not as much intuitive as I would guess at first, so I had to dig a little further.

To hide all files included in the .gitignore file:


Image1: find the ‘tree-view’ package and press Settings to enter the preferences of the package.


Image2: Scroll down to see the preference options.


Image3: Check the “Hide VCS ignored files” checkbox.

You may now see your tree view free of unwanted files.

I hope it helps.