Syntax Highlighting
:syntax on
To turn on the syntax highlighting
:syntax off
To turn off the syntax highlighting
Numbering
:set nu
Display the number in left side
Abbrevation
:abbreviate
List all the abbreviation
:ab svi static void __init
Assigns the svi character to static void __init
Mapping Keys
:map
List all the mapped key and its associated functions.
:map ;so System.out.println();<left><left>
Expands the text and put cursor in between the braces.
:map <F9> :make<enter>
:map <F5> i{<ESC>ea}<ESC>
Inserts {
e 🡪 move to end of word
a }🡪 append to word }
So this mapping, make the word to be surrounded by curly braces {}
Configuration Files
All the above settings are made visible only for the current session. In order to make it permanent, it has to be stored in some configuration file.
For vi editor 🡪 ~/.exrc
Vim editor 🡪 ~/.vimrc
No comments:
Post a Comment