The ultimate Vim configuration: vimrc
highlight search results :set hlsearch
temporarily hide highlight until the next search :noh
traverse word backward b
Typing %
while the cursor is on a (,),[,],{, or } goes to its match.
To substitute new for the first old in a line type :s/old/new
To substitute new for all 'old's on a line type :s/old/new/g
Open File explorer: shift+cmd+e
Open file: enter
Open file on a new split: ctrl+enter
Rename file: cmd+enter
New file: cmd+n
New folder: cmd+f
Toggle Terminal: cmd+j or ctrl+`
:Explore
- opens netrw in the current window
:Sexplore
- opens netrw in a horizontal split
:Vexplore
- opens netrw in a vertical split
https://stackoverflow.com/questions/4170887/vimrc-setting-to-ignore-file-types-in-netrw
Navigation C-HJKL
changed
Split vertically :vsp
Split horizontally :sp
:10sp
and :vsp path/to/file
is allowed
https://thoughtbot.com/blog/vim-splits-move-faster-and-more-naturally
Ctrl-w n+
Increase size of current split by n lines
Ctrl-w n-
Decrease size of current split by n lines
Ctrl-w n<
(For vertical)
Ctrl-w n>
To resize all windows to equal dimensions based on their splits, you can use Ctrl-w =
.
To increase a window to its maximum height, use Ctrl-w _
.
To increase a window to its maximum width, use Ctrl-w |
.
To move to the next tab: gt
To move to the previous tab: gT
My configuration:
map tn :tabnew
map t :tabnext
map tm :tabmove
map tc :tabclose
map to :tabonly
##Plug Manager
"""""" VUNDLE
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'kien/ctrlp.vim'
Plugin 'preservim/nerdtree'
call vundle#end() " required
filetype plugin indent on " required