100 Vim commands

March 25, 2015 Leave a comment

http://www.catswhocode.com/blog/100-vim-commands-every-programmer-should-know

This caught my eye

Window spliting
ctrl-w up arrow Puts cursor in top window
ctrl-w ctrl-w Puts cursor in next window
ctrl-w_ Maximise current window
ctrl-w= Gives the same size to all windows
10 ctrl-w+ Add 10 lines to current window
:vsplit file Split window vertically
:sview file Same as :split in readonly mode
:hide Close current window
:­nly Close all windows, excepted current
:b 2 Open #2 in this window

And lead me to reading “:help split” in vim

Categories: vim Tags:

Readonly Content cannot be changed

March 2, 2015 Leave a comment

Problem:
Apparently, unbeknownst to me, my libreoffice document has Microsoft Forms. All attempts to delete it gave a warning about “Readonly content can not be changed…”

Solution:
Found the solution gone here http://mednis.info/wp/?p=168

Python: Tips, Tricks and Idioms – Part 2

February 20, 2015 Leave a comment
Categories: Interesting, python

Turning off beep/ bell on vi

February 12, 2015 Leave a comment

Problem:
I was using vi and it kept on beeping at all my mistakes :-p

Solution:
Added the following line to my .vimrc

set visualbell

Source:
http://linuxconfig.org/turn-off-beep-bell-on-linux-terminal

Categories: vim Tags:

Free python tips

February 5, 2015 Leave a comment
Categories: python

vim modelines

February 4, 2015 Leave a comment

Problem:

I noted that my collegues did not like having line numbering on when editing their files. So instead of setting it globally in the .vimrc file I opted for modelines as this feature was not disabled.

Solution:

Placing this at the start of end of a file

# vim: nu ts=4 sw=4 expandtab

Unfortunately, I could not change the colorscheme using the same method :-(

Source:
http://vim.wikia.com/wiki/Modeline_magic

Categories: vim

Python: Tips, Tricks and Idioms – Part 1

January 30, 2015 Leave a comment
Categories: Interesting, python
Follow

Get every new post delivered to your Inbox.

Join 41 other followers