These are the commands i always use in vi. Continue reading vi commands cheat sheet
NERDTree is a great vi plugin which definitely speed up the development time for programmers using vi for file editing. For more information about NERDTree, please refer to NERDTree – The File Explorer in vi/vim.
To further speed up the file editing efficiency, we could map the vi commands to hotkeys in the /etc/vim/vimrc. Continue reading Mapping vi/vim commands to hotkeys
I have been working on Rails for more than half year and i do file editing with vi at server side most of the time. vi is a great tool but it is not convenient for editing multiple files which is very common in programmer. In the past, I had to close the file, cd to another directory and opened another file for editing. Continue reading NERDTree – The File Explorer in vi/vim
The vi/vim configuration file is located @ $HOME/.exrc. of it does not exist, just create it.
:set number :set ts=2
Your vi now will have tab size = 2 and line number is shown.
More useful settings Continue reading Linux – Configure the vi/vim Default Setting
You can show the line number in the vi editor by entering the following input command.
- :set number
If you find that your vi editor has controlling problem such as u cannot move the cursor using the arrow buttons or the text is modified when moving the cursor. u can try to fix it by setting the TERM variable.
- export TERM=”xterm”