Mapping Keys to vim to execute commands and scripts
Vim is powerful and light weight source code editor.
vim initialization settings can be done in .vimrc file.
For example if you add the following vim commands to the .vimrc file.
vim will initialize with the following settings:
.
.
se nu
se hlsearch
se incsearch
se cindent
.
.
.
One power full feature of .vimrc that i know is mapping of keys to execute the commands
mentioned in .vimrc file.
Below is the .vimrc file which executes eco_script_genertor.pl script and does multiple operations.
map Do./eco_script_generator.pl "pa"k0i#pj0D:w:!rm -r -f ./cmd.do:e ./cmd.dop:w:e#:!rm -r -f ./.cmd_out:!source ./cmd.do > ./.cmd_out:r ./.cmd_out
Here Ctrl+M key is mapped to execute the script.
vim initialization settings can be done in .vimrc file.
For example if you add the following vim commands to the .vimrc file.
vim will initialize with the following settings:
.
.
se nu
se hlsearch
se incsearch
se cindent
.
.
.
One power full feature of .vimrc that i know is mapping of keys to execute the commands
mentioned in .vimrc file.
Below is the .vimrc file which executes eco_script_genertor.pl script and does multiple operations.
map Do./eco_script_generator.pl "pa"k0i#pj0D:w:!rm -r -f ./cmd.do:e ./cmd.dop:w:e#:!rm -r -f ./.cmd_out:!source ./cmd.do > ./.cmd_out:r ./.cmd_out
Here Ctrl+M key is mapped to execute the script.
Comments
Post a Comment