- Put .vimrc file and .vim/ folder into home directory.
- open .vimrc and press : to go into command mode, type PlugInstall.
- (OPTIONAL) Once installed, download flake8 and black for better linting and syntax highlighting and move the flake8 file in ~/.config.
(for a complete vim built-in command list, visit - https://github.com/gibbok/vim-cheat-sheet)
--My leader is mapped to space(see .vimrc file)--
- leader + h = switch to tab to the left
- leader + j = switch to tab to the down
- leader + k = switch to tab to the up
- leader + l = switch to tab to the right
- leader + > = :vertical resize +5
- leader + < = :vertical resize -5
- leader + - = : resize -5
- leader + + = : resize +5
- leader + = = : resize
- leader + ov = open in vscode
- leader + od = open in document viewer
- leader + pv = file explorer(nerdtree was useless)
- , + v = horizontal split
- , + s = vertical split
- , + r = rotate
- , + x = close tab
- leader + rp = save and execute python file
- leader + arp = save and execute python file in shell mode
- leader + rs= execute shell script
- leader + rc= compile and run C file
- leader + 1 = 1st tab
- leader + 2 = 2nd tab
- leader + 3 = 3rd tab
- leader + 4 = 4th tab
- leader + 5 = 5th tab
- leader + 6 = 6th tab
- leader + 9 = last tab
- leader + 0 = first tab
-
leader + dtc = split into 3, 2 other for input and output files.
In insert mode
-
;init - initial template toggle
-
;bis - binary search template
-
;sys - import system
-
;; - move across placeholders ("%%%")
-
;for - for loop