vim: document used options
This commit is contained in:
parent
9df34c8219
commit
3a168c72a0
1 changed files with 72 additions and 71 deletions
|
@ -7,53 +7,56 @@ if $LOCAL_CONFIG == "" | let $LOCAL_CONFIG="~/.local/etc" | endif
|
||||||
let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc"
|
let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc"
|
||||||
|
|
||||||
" Options {{{
|
" Options {{{
|
||||||
set autoindent
|
set autoindent " take indent for new line from previous line
|
||||||
set autoread
|
set autoread " autom. read file when changed outside of Vim
|
||||||
let &background = $BACKGROUND ==# 'light' ? 'light' : 'dark'
|
let &background = $BACKGROUND ==# 'light' ? 'light' : 'dark'
|
||||||
set backspace=indent,eol,start
|
set backspace=indent,eol,start " sane backspace behavior
|
||||||
set nobackup
|
set nobackup " don't keep backup file after overwriting a file
|
||||||
set clipboard=unnamed
|
set clipboard=unnamed " synchronize with system clipboard
|
||||||
set colorcolumn=80
|
set colorcolumn=80 " highlight column 80
|
||||||
set cursorline
|
set cursorline " highlight the line of the cursor
|
||||||
set diffopt=filler,vertical
|
set diffopt=filler,vertical " make side-by-side diffs better
|
||||||
set encoding=utf8
|
set encoding=utf8 " use UTF-8 by default
|
||||||
set expandtab
|
set expandtab " use spaces whe <Tab> is inserted
|
||||||
set fileformats=unix,mac,dos
|
set fileformats=unix,mac,dos " prioritize unix <EOL> format
|
||||||
set foldenable
|
set foldenable " enable folding
|
||||||
set foldlevelstart=100
|
set foldlevelstart=100 " start with all folds open
|
||||||
set foldmethod=syntax
|
set foldmethod=syntax " fold based on syntax by default
|
||||||
set foldnestmax=10
|
set foldnestmax=10 " limit nested folds to 10 levels
|
||||||
let &formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[-*]\|\[[ x]\]\|([ x])\)\s*'
|
set formatlistpat="^\s*\(\d\+[\]:.)}\t ]\|[-*]\|\[[ x]\]\|([ x])\)\s*"
|
||||||
set formatoptions-=t
|
set formatoptions-=t " don't auto-wrap on 'textwidth'
|
||||||
set formatoptions+=jn
|
set formatoptions+=c " do auto-wrap comments on 'textwidth'
|
||||||
set hidden
|
set formatoptions+=j " remove comment leader when joining lings
|
||||||
set history=1000
|
set formatoptions+=n " recognize and indent lists automatically
|
||||||
set hlsearch
|
set hidden " hide abandoned buffers
|
||||||
set incsearch
|
set history=1000 " how many ":" commands to remember
|
||||||
set nojoinspaces
|
set hlsearch " highlight search results
|
||||||
set laststatus=2
|
set incsearch " use incremental search
|
||||||
set lazyredraw
|
set nojoinspaces " use one space after a period whe joining lines
|
||||||
set list
|
set laststatus=2 " always show a status line
|
||||||
set modelines=0
|
set lazyredraw " don't redraw screen when executing macros
|
||||||
set number
|
set list " show invisible characters
|
||||||
set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME
|
set listchars="tab:>~,extends:>,precedes:<,trail:-" " invisible chars
|
||||||
set scrolloff=5
|
set modelines=0 " never use modelines
|
||||||
set shiftwidth=4
|
set number " show line numbers
|
||||||
set shortmess+=I
|
set nrformats-=octal " number formats for CTRL-A & CTRL-X commands
|
||||||
set showmatch
|
set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME " so vim-plug can work
|
||||||
set noshowmode
|
set scrolloff=5 " minimum number of lines above and below cursor
|
||||||
set sidescrolloff=5
|
set shiftwidth=4 " number of spaces to use for (auto)indent step
|
||||||
set nrformats-=octal
|
set shortmess+=I " don't show the intro message when starting Vim
|
||||||
set smartindent
|
set showbreak="-> " " prefix for wrapped lines
|
||||||
set smarttab
|
set showmatch " briefly jump to matching bracket if insert one
|
||||||
set splitbelow
|
set noshowmode " don't show mode (using airline instead)
|
||||||
set splitright
|
set sidescrolloff=5 " min. number of columns to left and right of cursor
|
||||||
set noswapfile
|
set smartindent " use smart autoindenting
|
||||||
set tabstop=4
|
set smarttab " use 'shiftwidth' when inserting <Tab>
|
||||||
set textwidth=79
|
set splitbelow " new window from split is below the current one
|
||||||
set timeoutlen=1000
|
set splitright " new window is put right of the current one
|
||||||
set ttimeoutlen=100
|
set noswapfile " don't use swap files
|
||||||
set ttyfast
|
set tabstop=4 " tabs are 4 spaces
|
||||||
|
set textwidth=79 " maximum width for text being inserted
|
||||||
|
set timeout timeoutlen=1000 ttimeoutlen=100 " timeout on mappings & key codes
|
||||||
|
set ttyfast " indicate a fast terminal for smoother redrawing
|
||||||
" +--Disable hlsearch while loading viminfo
|
" +--Disable hlsearch while loading viminfo
|
||||||
" | +--Remember marks for last 500 files
|
" | +--Remember marks for last 500 files
|
||||||
" | | +--Remember up to 10000 lines in each register
|
" | | +--Remember up to 10000 lines in each register
|
||||||
|
@ -62,23 +65,21 @@ let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc"
|
||||||
" | | | | | +---Remember last 1000 commands
|
" | | | | | +---Remember last 1000 commands
|
||||||
" | | | | | |
|
" | | | | | |
|
||||||
" v v v v v v
|
" v v v v v v
|
||||||
set viminfo=h,'500,<10000,s1000,/1000,:1000
|
set viminfo=h,'500,<10000,s1000,/1000,:1000
|
||||||
set viminfofile=$XDG_CACHE_HOME/vim/viminfo
|
set viminfofile=$XDG_CACHE_HOME/vim/viminfo
|
||||||
set virtualedit=block
|
set virtualedit=block " position the cursor anywhere in Visual Block mode
|
||||||
set wildignore=*.o,*.obj,*.pyc,*.exe,*.so,*.dll
|
set wildignore=*.o,*.obj,*.pyc,*.exe,*.so,*.dll
|
||||||
set wildmenu
|
set wildmenu " use the menu for commandline completion
|
||||||
set wrap
|
set wrap " wrap long lines
|
||||||
set writebackup
|
set writebackup " make a backup before overwriting a file
|
||||||
|
|
||||||
if has('multi_byte') && &encoding ==# 'utf-8'
|
" Overrides when UTF-8 is available
|
||||||
set foldtext=VimrcFoldText()
|
if has('multi_byte') && &encoding ==# 'utf-8'
|
||||||
set fillchars=vert:┃,fold:·
|
set foldtext=VimrcFoldText()
|
||||||
let &listchars = 'tab:▷ ,extends:»,precedes:«,trail:·'
|
set fillchars=vert:┃,fold:·
|
||||||
let &showbreak = ' ⤷ '
|
set showbreak=" ⤷ " " prefix for wrapped lines
|
||||||
else
|
set listchars="tab:▷ ,extends:»,precedes:«,trail:·" " invisible chars
|
||||||
let &listchars = 'tab:>~,extends:>,precedes:<,trail:-'
|
endif
|
||||||
let &showbreak = '-> '
|
|
||||||
endif
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" Plugins {{{
|
" Plugins {{{
|
||||||
|
|
Loading…
Add table
Reference in a new issue