···11-"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
21"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support
22+"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
33"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
44if (empty($TMUX))
55 if (has("nvim"))
···4343set cmdheight=2 " More space for displaying messages
4444set pumheight=10 " Makes popup menu smaller
4545set hidden " Required to keep multiple buffers open multiple buffers
4646+set timeoutlen=500 " By default timeoutlen is 1000 ms
46474748"general
4849let mapleader = "\<Space>"
···6061set numberwidth=5
6162set relativenumber
62636464+6565+"
6666+" REMAPS
6767+" Swiss keyboard remap
6868+"
6969+"switch between two buffers -> C-^ does not work with current swiss layout
7070+nnoremap <C-6> <C-^><cr>
7171+7272+7373+7474+" Others
7575+"
7676+7777+"Which-key healper for leader-key mapping
7878+nnoremap <silent> <leader> :WhichKey '<Space>'<CR>
7979+" Create map to add keys to
8080+let g:which_key_map = {}
8181+" Define a separator
8282+let g:which_key_sep = '→'
8383+8484+" Not a fan of floating windows for this
8585+let g:which_key_use_floating_win = 0
8686+" Hide status line
8787+autocmd! FileType which_key
8888+autocmd FileType which_key set laststatus=0 noshowmode noruler
8989+ \| autocmd BufLeave <buffer> set laststatus=2 noshowmode ruler
9090+9191+" Single mappings
9292+let g:which_key_map['ff'] = [ 'Telescope' , 'find files' ]
9393+let g:which_key_map['fb'] = [ 'Telescope' , 'find buffer' ]
9494+let g:which_key_map['h'] = [ '<C-W>' , 'split below']
9595+let g:which_key_map['j'] = [ ':m .+1<CR>==' , 'move current line one down']
9696+let g:which_key_map['v'] = [ '<C-W>v' , 'split right']
9797+let g:which_key_map['k'] = [ ':m .-2<CR>==' , 'move current line one up']
9898+9999+" s is for search
100100+let g:which_key_map.s = {
101101+ \ 'name' : '+search' ,
102102+ \ '/' : [':History/' , 'history'],
103103+ \ ';' : [':Commands' , 'commands'],
104104+ \ 'a' : [':Ag' , 'text Ag'],
105105+ \ 'b' : [':BLines' , 'current buffer'],
106106+ \ 'B' : [':Buffers' , 'open buffers'],
107107+ \ 'c' : [':Commits' , 'commits'],
108108+ \ 'C' : [':BCommits' , 'buffer commits'],
109109+ \ 'f' : [':Files' , 'files'],
110110+ \ 'g' : [':GFiles' , 'git files'],
111111+ \ 'G' : [':GFiles?' , 'modified git files'],
112112+ \ 'h' : [':History' , 'file history'],
113113+ \ 'H' : [':History:' , 'command history'],
114114+ \ 'l' : [':Lines' , 'lines'] ,
115115+ \ 'm' : [':Marks' , 'marks'] ,
116116+ \ 'M' : [':Maps' , 'normal maps'] ,
117117+ \ 'p' : [':Helptags' , 'help tags'] ,
118118+ \ 'P' : [':Tags' , 'project tags'],
119119+ \ 's' : [':Snippets' , 'snippets'],
120120+ \ 'S' : [':Colors' , 'color schemes'],
121121+ \ 't' : [':Rg' , 'text Rg'],
122122+ \ 'T' : [':BTags' , 'buffer tags'],
123123+ \ 'w' : [':Windows' , 'search windows'],
124124+ \ 'y' : [':Filetypes' , 'file types'],
125125+ \ 'z' : [':FZF' , 'FZF'],
126126+ \ }
127127+128128+" Register which key map
129129+call which_key#register('<Space>', "g:which_key_map")
130130+63131" Easy CAPS
132132+64133"inoremap <c-u> <ESC>viwUi
65134"nnoremap <c-u> viwU<Esc>
66135···104173vnoremap K :m '<-2<CR>gv=gv
105174inoremap <C-j> <esc>:m .+1<CR>==
106175inoremap <C-k> <esc>:m .-2<CR>==
176176+" moves current line one down
107177nnoremap <leader>j :m .+1<CR>==
178178+" moves current line one up
108179nnoremap <leader>k :m .-2<CR>==
109180110181" Commenting blocks of code.
···151222Plug 'davidhalter/jedi-vim'
152223Plug 'jmcantrell/vim-virtualenv'
153224225225+Plug 'liuchengxu/vim-which-key'
154226call plug#end()
155227"install with :PlugInstall
156228
+4-2
vim/vim-shortcuts.md
···11-2111.08.2021
3243# learning VIM
···4948 useful when you work in a file for long!
5049### global marks
5150same as local also set with m, but this time the any key will be capitalized
5252-5151+### buffer operation
5252+c-^ switching between latest two files in buffer
5353+:b starting-file-name <tab> will serach your buffer and let you switch between files
5454+:bd closes/deletes current buffer (will not delete when you saved, it just unloads from buffer)
5355## window operations
5456ctrl+w: entering window mode
5557then: