Friday, August 9, 2013
Wednesday, August 7, 2013
Tuesday, August 6, 2013
How to open a file in Read Only mode
- vim -R fileName
Typing a big command on Terminal ?
Why don't you try reverse-i-search feature built in the terminal. Just press Ctrl + R and only a unique part of the big command that you have already executed before.
Here is how I start eclipse on my system just by typing 'ec'
You might find a problem associated with reverse search that it just searches in the reverse direction and once your are past what you were searching for , your efforts are rendered useless.
There is a solution around this and you can enable forward search by some modifications.
Why don't you try reverse-i-search feature built in the terminal. Just press Ctrl + R and only a unique part of the big command that you have already executed before.
Here is how I start eclipse on my system just by typing 'ec'
You might find a problem associated with reverse search that it just searches in the reverse direction and once your are past what you were searching for , your efforts are rendered useless.
There is a solution around this and you can enable forward search by some modifications.
- Open up .bashrc and add the following lines in it
- stty -ixon
- refresh the bash setting by executing
- source .bashrc
Now you will be able to search forward using Ctrl + s .
Dot Files
Make Vim even better with some dot files ( https://github.com/sontek/dotfiles ).
Handy Vim shortcuts
- Line Numbers
- Set line number with
- :set nu
- Unset line numbers with
- :set nonu
- Set relative line numbers with
- :set relativenumber.
- Copy selected lines from vim visual mode to system clipboard.
- "+y and then paste it outside vim.
- Make vim paste the content from outside properly.
- :set paste
- unfold code
- zo
- fold code
- zc
Subscribe to:
Posts (Atom)