This repository hosts my vim configuration.
For neovim configuration, see here : https://github.com/frazrepo/nvim-config
1) git clone --depth=1 https://github.com/frazrepo/vimrc.git ~/.vim_runtime
2) run ./install.sh
1) git clone --depth=1 https://github.com/frazrepo/vimrc.git %USERPROFILE%/.vim_runtime
2) run install.bat
Just do a git rebase!
cd ~/.vim_runtime
git pull --rebase
And run install.sh (or install.bat) to update vimrc configuration file
Default GUI : auy (light theme), dracula (dark theme)
Default Terminal : apprentice (dark theme)
Dark theme : anderson, atom-dark256, apprentice, codedark, gruvbox8, minimalist,
molokai, mustang, monokai(sublime text), nord, seoul, space-vim-dark
Light theme : ayu (dark available), seoul256-light, pencil
Click to expand
leader =
General
Mapping | Action |
---|---|
<leader>w | Save buffer |
:W | Save as sudo (linux) |
<leader>fr | Find/Replace highlighted text |
<leader> | noh |
<leader>m | Remove bad formatting ^M |
<leader>f | Search current buffer using Ilist |
Move between Windows
Mapping | Action |
---|---|
<C-h> | Left |
<C-l> | Right |
Buffers
Mapping | Action |
---|---|
<leader>bn | New buffer |
<leader>bd or ! | Close buffer |
<leader>ba | Close all buffers |
<bs> | Navigate alternate buffer |
<leader>h | Navigate previous |
<leader>l | Navigate next |
<leader>e | Edit in current buffer's path |
<leader>x | Scratch txt |
<leader>d: | Scratch Markdown |
<leader>s | Scratch SQL |
Tabs
Mapping | Action |
---|---|
<leader>tn | New tab |
<leader>to | Tab Only |
<leader>tc | Close tab |
<leader><bs> | Alternate tab |
<leader>te | Edit new tab in current buffer's path |
Paste inner object quickly
Mapping | Action |
---|---|
<leader>p | "0p |
Formatting
Mapping | Action |
---|---|
g= | Equalize entire document |
gQ | Format entire document |
Mapping | Action |
---|---|
* | Search current selection |
# | Search current selection backward |
<leader>r | Replace visual selection |
Mapping | Action |
---|---|
:W | Write sudo |
Mapping | Action |
---|---|
F3 | Neoformat |
F4 | UndoTreeToggle |
F8 | Toggle quickfix window |
F9 | Toggle CtrlSF |
F10 | Rotate colorschemes |
<M-0> | Set font bigger (gui only) |
<M-9> | Set font smaller (gui only) |
Emmet
Mapping | Action |
---|---|
,, | Generate emmet |
vim-lion
Mapping | Action |
---|---|
gl{to-m}= | Right Align with = |
gL{to-m}= | Left Align with = |
vim-abolish
Mapping | Action |
---|---|
Subvert | Search Command |
crs | Coerce to snake_case |
crm | Coerce to MixedCase |
crc | Coerce to CamelCase |
cru | Coerce to UPPER_CASE |
cr- | Coerce to dash-case |
cr. | Coerce to dot-case |
cr | Coerce to space case |
crt | Coerce to Title Case |
vim-exchange
Mapping | Action |
---|---|
cx{to-motion} | Exchange with text object or motion |
cxx | Exchange lines |
ReplaceWithRegister
Mapping | Action |
---|---|
{"reg}gr{to-motion} | Paste register content on text object or motion |
{"reg}{motion}grr | Paste register content on lines |
vim-sandwich with surroung mappings
Mapping | Action |
---|---|
cs"= | Change surround |
css" | Change surround on line (detect surrouding) |
ys{motion}" | Add surround |
yss" | Add surround on line |
ds" | Delete surround |
dss | Delete surround on line |
S" | Add surround on visual selection |
vim-gtfo
Mapping | Action |
---|---|
gof | Open current buffer directory |
got | Open current buffer directory on terminal |
vim-unimpaired
Mapping | Action |
---|---|
( and ) | Map keys |
(t, )t | Switch between tabs |
(b, )b | Switch between buffers |
yo[r,n,w,x,....] | Toggle Options |
(space, )space, 10)space, (e, )e | Lines operations |
LeaderF
Mapping | Action |
---|---|
<c-p> | Files (t to open file in tab) |
<leader>, | Buffers |
<leader>; | BLines |
<leader>u | MRU |
<leader>co | Commands |
vim-rainbow
Mapping | Action |
---|---|
RainbowToggle | Toggle coloring |
vim-rotatescheme
Mapping | Action |
---|---|
F10 / <S-F10> | Rotate Forward/Backward |
vim-scripts/Tranpose
Mapping | Action |
---|---|
Tranpose | |
TranposeWords | |
TranposeTab | |
TranposeCSV , | |
TranposeInteractive |
sort-motion
Mapping | Action |
---|---|
gs{motion} | gs3j, gsi(, |
ultisnips and vim-snippets
Mapping | Action |
---|---|
<Tab> | Expand |
<Tab> | Jump forward |
<S-Tab> | Jump backward |
CtrlSF
Mapping | Action |
---|---|
<leader>* | Find selected word |
F9 | Toggle CtrlSF result Window |
<leader>/ | Prompt or Exec in Visual Mode |
yankmatches
Mapping | Action |
---|---|
ym / YM | Yank highlighted search lines (YM for inverse) |
dm / DM | Delete highlighteed search line (DM for inverse) |
zirrostig/vim-schlepp
Mapping | Action |
---|---|
up/down/left/right | After a selection in visual mode, drag using arrow key |
D | Duplicate in Visual Mode |
custom text-objects
Mapping | Action |
---|---|
ciq, daq | Quotes q |
vic, vac, viC, vaC | Columns c |
cii, dai | Indents i |
cin(l)q, dai, ci,, ci=, .. | Targets |
cil, yil | Line l |
yie, cie | Entire e |
Miscellaneous Commands
Mapping | Action |
---|---|
ListLeaders | Show all leader mappings |
VisualBlock | Activate visual block mode |
SortByWitdh | Sort lines by width |
WipeReg | Clean all registers |
RemoveTrailingSpaces | Remove spaces |
Regexp search/replace pattern
:h fztips
:h fzvimtips
- completor : Manage auto completion correctly
- ctrlsf.vim : Side searching
- emmet-vim : Html editing
- leaderF : Fuzzy finder
- lightline : Lightweight status line
- neoformat: Various formatters for many languages
- auto-pairs : Auto close pairs (parentheses, quotes, ...)
- utilsnips + vim-snippets : Snippets
- vim-abolish : Search words, Coercion
- vim-commentary
- vim-nerdtree : Tree Explorer
- vim-exchange : Exchange in pair with a new operator cx
- vim-fugitive : Git command inside vim
- vim-gtfo : Go to File Manager or Terminal
- vim-lion : Align text (like tabular)
- ReplaceWithRegister : Custom operator gr to replace with register content
- vim-move : Move lines or selections up and down using (ALT) jk keys
- vim-over : Highlight buffer when operating from command line (s/, /, g/)
- vim-polyglot : Languages Support
- vim-qlist : Enhances ilist and dlist
- vim-qf : Quickfix management, filtering,...
- vim-rainbow : Color parentheses, brackets,...
- vim-repeat : To repeat plugin command with dot (.)
- vim-rooter : Change dir to root project directory
- vim-rotatescheme : Custom plugin to rotate a list of colorschemes
- vim-sandwich : Surround texts with delimiters
- vim-sort-motion : Add an operator gs to apply sort
- targets.vim : Some text objects - quotes (q), columns (c), indents (i), line (l), entire buffer (e)
- vim-tranpose : Tranpose lines, csv, words, ...
- vim-unimpaired : Toogle Options, Next/Previous, Switch Lines or Add Spaces
Just do following:
- Remove
~/.vim_runtime
- Remove any lines that reference
.vim_runtime
in your~/.vimrc