linux:vim_dodger_setup
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
linux:vim_dodger_setup [2022/02/11 11:36] – external edit 127.0.0.1 | linux:vim_dodger_setup [2022/02/21 15:12] – [Plugin config files] dodger | ||
---|---|---|---|
Line 8: | Line 8: | ||
^Notify changes to:| dodger | | ^Notify changes to:| dodger | | ||
^Tags:| | | ^Tags:| | | ||
+ | |||
+ | |||
+ | ====== Advanced vimrc (2022) edition====== | ||
+ | |||
+ | ===== Globals ===== | ||
+ | This is the initial vimrc file. | ||
+ | <file vim ~/ | ||
+ | " ############################################## | ||
+ | " GLOBAL CONFIG | ||
+ | " ############################################## | ||
+ | set encoding=utf-8 | ||
+ | set nocompatible | ||
+ | |||
+ | " map leader with , to start combos | ||
+ | let mapleader = "," | ||
+ | |||
+ | </ | ||
+ | |||
+ | I'm remaping the leader key for convenience... | ||
+ | |||
+ | ===== vim-plug ===== | ||
+ | Use [[https:// | ||
+ | <code bash> | ||
+ | curl -fLo ~/ | ||
+ | https:// | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== patogen ===== | ||
+ | The official instructions from [[https:// | ||
+ | <code bash> | ||
+ | mkdir -p ~/ | ||
+ | curl -LSso ~/ | ||
+ | |||
+ | echo " | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== PlugInstall command ===== | ||
+ | |||
+ | Add to '' | ||
+ | |||
+ | <code vim> | ||
+ | call plug# | ||
+ | " The default plugin directory will be as follows: | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " You can specify a custom plugin directory by passing it as the argument | ||
+ | " | ||
+ | " | ||
+ | |||
+ | " Make sure you use single quotes | ||
+ | |||
+ | " Shorthand notation; fetches https:// | ||
+ | Plug ' | ||
+ | |||
+ | " Any valid git URL is allowed | ||
+ | Plug ' | ||
+ | |||
+ | " Multiple Plug commands can be written in a single line using | separators | ||
+ | Plug ' | ||
+ | |||
+ | " On-demand loading | ||
+ | Plug ' | ||
+ | Plug ' | ||
+ | |||
+ | " Using a non-default branch | ||
+ | Plug ' | ||
+ | |||
+ | " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) | ||
+ | Plug ' | ||
+ | |||
+ | " Plugin options | ||
+ | Plug ' | ||
+ | |||
+ | " Plugin outside ~/ | ||
+ | Plug ' | ||
+ | |||
+ | " Unmanaged plugin (manually installed and updated) | ||
+ | "Plug ' | ||
+ | |||
+ | Plug ' | ||
+ | Plug ' | ||
+ | |||
+ | Plug ' | ||
+ | |||
+ | Plug ' | ||
+ | |||
+ | " Initialize plugin system | ||
+ | call plug#end() | ||
+ | </ | ||
+ | |||
+ | Then call the installation: | ||
+ | <code vim> | ||
+ | : | ||
+ | </ | ||
+ | |||
+ | That will install all the above plugins: | ||
+ | * ' | ||
+ | * ' | ||
+ | * ' | ||
+ | * ' | ||
+ | * ' | ||
+ | * ' | ||
+ | * ' | ||
+ | * ' | ||
+ | * ' | ||
+ | * ' | ||
+ | * ' | ||
+ | * ' | ||
+ | * ' | ||
+ | |||
+ | |||
+ | |||
+ | ===== Plugin config files ===== | ||
+ | |||
+ | <code vim> | ||
+ | " NERD commenter | ||
+ | source ~/ | ||
+ | |||
+ | " syntastic | ||
+ | source ~/ | ||
+ | |||
+ | " undotree | ||
+ | source ~/ | ||
+ | |||
+ | " nerdtree | ||
+ | source ~/ | ||
+ | </ | ||
+ | |||
+ | <file vim ~/ | ||
+ | " Create default mappings | ||
+ | let g: | ||
+ | |||
+ | " Add spaces after comment delimiters by default | ||
+ | let g: | ||
+ | |||
+ | " Use compact syntax for prettified multi-line comments | ||
+ | let g: | ||
+ | |||
+ | " Align line-wise comment delimiters flush left instead of following code indentation | ||
+ | let g: | ||
+ | |||
+ | " Set a language to use its alternate delimiters by default | ||
+ | let g: | ||
+ | |||
+ | " Add your own custom formats or override the defaults | ||
+ | let g: | ||
+ | |||
+ | " Allow commenting and inverting empty lines (useful when commenting a region) | ||
+ | let g: | ||
+ | |||
+ | " Enable trimming of trailing whitespace when uncommenting | ||
+ | let g: | ||
+ | |||
+ | " Enable NERDCommenterToggle to check all selected lines is commented or not | ||
+ | let g: | ||
+ | |||
+ | " map leader with , to start combos | ||
+ | let mapleader = "," | ||
+ | </ | ||
+ | |||
+ | <file vim ~/ | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " jgs `{{{{` | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | |||
+ | set statusline+=%# | ||
+ | set statusline+=%{SyntasticStatuslineFlag()} | ||
+ | set statusline+=%* | ||
+ | |||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | let g: | ||
+ | </ | ||
+ | |||
+ | <file vim ~/ | ||
+ | " https:// | ||
+ | " | ||
+ | " | ||
+ | |||
+ | " Window layout | ||
+ | " style 1 | ||
+ | " +----------+------------------------+ | ||
+ | " | | | | ||
+ | " | | | | ||
+ | " | undotree | | | ||
+ | " | | | | ||
+ | " | | | | ||
+ | " +----------+ | ||
+ | " | | | | ||
+ | " | | ||
+ | " | | | | ||
+ | " +----------+------------------------+ | ||
+ | " Style 2 | ||
+ | " +----------+------------------------+ | ||
+ | " | | | | ||
+ | " | | | | ||
+ | " | undotree | | | ||
+ | " | | | | ||
+ | " | | | | ||
+ | " +----------+------------------------+ | ||
+ | " | | | ||
+ | " | | ||
+ | " | | | ||
+ | " +-----------------------------------+ | ||
+ | " Style 3 | ||
+ | " +------------------------+----------+ | ||
+ | " | | | | ||
+ | " | | | | ||
+ | " | | undotree | | ||
+ | " | | | | ||
+ | " | | | | ||
+ | " | +----------+ | ||
+ | " | | | | ||
+ | " | | | ||
+ | " | | | | ||
+ | " +------------------------+----------+ | ||
+ | " Style 4 | ||
+ | " +-----------------------++----------+ | ||
+ | " | | | | ||
+ | " | | | | ||
+ | " | | undotree | | ||
+ | " | | | | ||
+ | " | | | | ||
+ | " +------------------------+----------+ | ||
+ | " | | | ||
+ | " | diff | | ||
+ | " | | | ||
+ | " +-----------------------------------+ | ||
+ | if !exists(' | ||
+ | let g: | ||
+ | endif | ||
+ | |||
+ | if has(" | ||
+ | let target_path = expand(' | ||
+ | |||
+ | " create the directory and any parent directories | ||
+ | " if the location does not exist. | ||
+ | if !isdirectory(target_path) | ||
+ | call mkdir(target_path, | ||
+ | endif | ||
+ | |||
+ | let & | ||
+ | set undofile | ||
+ | endif | ||
+ | |||
+ | nnoremap < | ||
+ | </ | ||
+ | |||
+ | |||
+ | **Disabled, using FZF** | ||
+ | <file vim ~/ | ||
+ | nnoremap < | ||
+ | nnoremap <C-n> : | ||
+ | nnoremap <C-t> : | ||
+ | nnoremap <C-f> : | ||
+ | </ | ||
+ | |||
+ | |||
+ | FZF: | ||
+ | <file vim ~/ | ||
+ | " https:// | ||
+ | nnoremap < | ||
+ | let g: | ||
+ | \ ' | ||
+ | \ ' | ||
+ | \ ' | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Cheatsheet generated ===== | ||
+ | |||
+ | In my config: | ||
+ | * '' | ||
+ | * ''< | ||
+ | |||
+ | |||
+ | ^ ##############''' | ||
+ | |''< | ||
+ | |''< | ||
+ | |''< | ||
+ | |''< | ||
+ | |''< | ||
+ | |''< | ||
+ | |''< | ||
+ | |''< | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | ''< | ||
+ | | ''< | ||
+ | | ''< | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | |||
====== Simple vimrc ====== | ====== Simple vimrc ====== | ||
Line 172: | Line 492: | ||
" | " | ||
</ | </ | ||
- | |||
- | |||
- | ====== Advanced vimrc (2022) edition====== | ||
- | |||
- | ===== vim-plug ===== | ||
- | Use [[https:// | ||
- | <code bash> | ||
- | curl -fLo ~/ | ||
- | https:// | ||
- | </ | ||
- | |||
- | |||
- | |||
linux/vim_dodger_setup.txt · Last modified: 2022/12/14 10:32 by dodger