programming:vimrc
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| programming:vimrc [2018/10/18 11:49] – created clemix | programming:vimrc [2020/01/24 22:46] (current) – [Install] clemix | ||
|---|---|---|---|
| Line 22: | Line 22: | ||
| " let Vundle manage Vundle, required | " let Vundle manage Vundle, required | ||
| Plugin ' | Plugin ' | ||
| + | Plugin ' | ||
| + | Plugin ' | ||
| + | Plugin ' | ||
| + | Plugin ' | ||
| + | Plugin ' | ||
| + | Bundle ' | ||
| + | Plugin ' | ||
| + | |||
| " Plugin ' | " Plugin ' | ||
| " The following are examples of different formats supported. | " The following are examples of different formats supported. | ||
| Line 43: | Line 51: | ||
| call vundle# | call vundle# | ||
| filetype plugin indent on " required | filetype plugin indent on " required | ||
| + | |||
| + | " | ||
| + | py << EOF | ||
| + | import os | ||
| + | import sys | ||
| + | if ' | ||
| + | project_base_dir = os.environ[' | ||
| + | activate_this = os.path.join(project_base_dir, | ||
| + | execfile(activate_this, | ||
| + | EOF | ||
| + | |||
| + | let g: | ||
| + | map < | ||
| + | |||
| " To ignore plugin indent changes, instead use: | " To ignore plugin indent changes, instead use: | ||
| " | " | ||
| Line 81: | Line 103: | ||
| - | set statusline=%F%m%r%h%w\ [%L]\ [%{& | + | "set statusline=%F%m%r%h%w\ [%L]\ [%{& |
| " | " | ||
| " | " | ||
| Line 145: | Line 167: | ||
| set nowrap | set nowrap | ||
| + | set colorcolumn=80 | ||
| set wildmode=longest, | set wildmode=longest, | ||
| Line 153: | Line 176: | ||
| :nnoremap <F8> :let @/ | :nnoremap <F8> :let @/ | ||
| :nnoremap <F9> : | :nnoremap <F9> : | ||
| - | :nnoremap | + | :nmap <F7> :ts < |
| " | " | ||
| Line 175: | Line 198: | ||
| let spellst = [" | let spellst = [" | ||
| " toggle spelling with F2 key | " toggle spelling with F2 key | ||
| - | map <F3> :set spell!< | + | map <F3> :set spell!< |
| " they were using white on white | " they were using white on white | ||
| highlight PmenuSel ctermfg=black ctermbg=lightgray | highlight PmenuSel ctermfg=black ctermbg=lightgray | ||
| Line 181: | Line 204: | ||
| set sps=best,5 | set sps=best,5 | ||
| " highlighting | " highlighting | ||
| - | hi SpellBad ctermfg=Red | + | hi SpellBad ctermfg=Red cterm=underline |
| - | hi SpellCap ctermfg=blue | + | hi SpellCap ctermfg=blue cterm=underline |
| imap <F4> < | imap <F4> < | ||
| Line 256: | Line 279: | ||
| command! -nargs=* Find :call Find(< | command! -nargs=* Find :call Find(< | ||
| - | function! Grn(...) | + | " |
| - | if a:0==2 | + | "colorscheme eclipse |
| - | let path=a:1 | + | |
| - | let query=a:2 | + | |
| - | else | + | |
| - | let path="./" | + | |
| - | let query=a:1 | + | |
| - | endif | + | |
| - | let ignore | + | set clipboard=unnamedplus |
| - | let l: | + | " |
| - | let l: | + | " |
| + | autocmd BufWritePre * %s/\s\+$//e | ||
| + | </ | ||
| - | if l:num < 1 | + | ====== Install ====== |
| - | echo "'" | + | <code bash> |
| - | | + | git clone https:// |
| - | endif | + | vim +PluginInstall +qall |
| + | </ | ||
| - | if l:num == 1 | + | Install YCM https://github.com/ |
| - | exe "open " | + | <code bash> |
| - | | + | sudo apt install build-essential cmake python3-dev |
| - | let tmpfile = tempname() | + | |
| - | exe " | + | |
| - | silent echon l:list | + | |
| - | redir END | + | |
| - | let old_efm = &efm | + | |
| - | set efm=%f | + | |
| - | if exists(": | + | cd ~/.vim/ |
| - | execute " | + | python3 install.py --clang-completer |
| - | else | + | </ |
| - | | + | |
| - | endif | + | |
| - | let & | + | ====== Alias Helpers ====== |
| + | <code bash> | ||
| + | alias ctags-perl=" | ||
| + | --exclude=' | ||
| + | --exclude=.git --exclude=' | ||
| + | --extras=+q \ | ||
| + | --languages=Perl \ | ||
| + | --langmap=Perl: | ||
| - | | + | alias ctags-c++="ctags -R \ |
| - | | + | --exclude=' |
| + | --exclude=.git --exclude=' | ||
| + | --c++-kinds=+p \ | ||
| + | --fields=+iaS \ | ||
| + | --extras=+q \ | ||
| + | --langmap=c++: | ||
| - | call delete(tmpfile) | + | alias ctags-python=" |
| - | endif | + | --exclude=' |
| + | --exclude=.git --exclude=' | ||
| + | --fields=+l \ | ||
| + | --extras=+q \ | ||
| + | --languages=python \ | ||
| + | --python-kinds=-iv" | ||
| - | endfunction | ||
| - | command! | + | alias grn=" |
| + | alias git-show-files="git log --pretty=format: --name-only | ||
| + | alias git-hist=" | ||
| - | " | + | </code> |
| - | " | + | |
| - | + | ||
| - | set clipboard=unnamedplus | + | |
| - | + | ||
| - | " | + | |
| - | " | + | |
| - | autocmd BufWritePre * %s/ | + | |
| - | </file> | + | |
programming/vimrc.1539856171.txt.gz · Last modified: by clemix
