2018/09/03

vimrc 备份

  1 "" Let's start VIM journey
  2 set nocompatible
  3 
  4 "" Include default settings
  5 "source $VIMRUNTIME/vimrc_example.vim
  6 "source $VIMRUNTIME/gvimrc_example.vim
  7 
  8 "" shell settings
  9 let $PATH="$HOME/bin;C:/msys64/usr/bin;C:/msys64/mingw64/bin;C:/Windows;C:/Windows/System32"
 10 set shell=bash.exe
 11 set shellslash
 12 
 13 "" Don't need ugly files
 14 set backupdir=c:/temp/vim/backup
 15 set directory=c:/temp/vim/swap
 16 set nobackup
 17 set swapfile
 18 set undodir=c:/temp/vim/undo
 19 set undofile
 20 set writebackup
 21 
 22 "" UI settings
 23 set cmdheight=2
 24 "set guioptions-=t
 25 set laststatus=2
 26 set lazyredraw
 27 set lines=35 columns=160
 28 set number
 29 set renderoptions=type:directx
 30 set ruler
 31 set showcmd
 32 set wildmenu
 33 
 34 "colorscheme torte
 35 colorscheme koehler
 36 
 37 "" Tab/Space related
 38 set expandtab
 39 set shiftwidth=4
 40 set softtabstop=4
 41 set tabstop=4
 42 
 43 "" IME settings
 44 if has("multi_byte")
 45   set encoding=utf-8
 46   "let &termencoding = &encoding
 47   set termencoding=unicode
 48   " Set default encoding as UTF-8 with BOM
 49   setglobal fileencoding=utf-8 "bomb "bomb introduce problem for *nix
 50   set fileencodings=ucs-bom,utf-8,gb18030,cp936,cp950,latin1
 51   " Walkaround the encoding problem for fenc=utf-8 && enc=ucs-2
 52   augroup i18n
 53     autocmd!
 54     autocmd BufReadPost * if &fileencoding == "utf-8" | let &encoding = &fileencoding | endif
 55   augroup END
 56 endif
 57 
 58 "" Enable the Chinese characters
 59 "set guifont=Fira_Code:h11:cANSI,NSimSun:h12:cGB2312
 60 set guifont=Iosevka:h12:cANSI:qDRAFT ",SimHei:h12:cGB2312:qDRAFT
 61 "set guifontwide=SimHei:h12:cGB2312
 62 "set guifontwide=Microsoft_YaHei:h12:cGB2312
 63 set guifontwide=Noto_Mono:h12:cGB2312
 64 
 65 "" IME
 66 if has('multi_byte_ime')
 67   "未开启IME时光标背景色
 68   hi Cursor guifg=bg guibg=Orange gui=NONE
 69   "开启IME时光标背景色
 70   hi CursorIM guifg=NONE guibg=Skyblue gui=NONE
 71   " 关闭Vim的自动切换IME输入法(插入模式和检索模式)
 72   set iminsert=0 imsearch=0
 73   " 插入模式输入法状态未被记录时,默认关闭IME
 74   inoremap <silent> <ESC> <ESC>:set iminsert=0<CR>
 75 endif
 76 
 77 "" Useful Plugins
 78 packadd vim-fugitive
 79 "" Plugin - airline
 80 let g:airline_theme='solarized'
 81 let g:airline_detect_iminsert=1
 82 let g:airline_highlighting_cache = 1
 83 let g:airline_powerline_fonts = 1
 84 let g:airline#extensions#tabline#enabled = 1
 85 packadd vim-airline
 86 packadd vim-airline-themes
 87 
 88 "" Plugins
 89 packadd! emmet-vim
 90 packadd! ctrlp.vim
 91 packadd! nerdtree
 92 
 93 "" Key Maps
 94 "" display the syntax name under the cursor
 95 map <F12>   :echo synIDattr(synIDtrans(synID(line("."), col("."), 1)), "name")<CR>
 96 "" We can navigate the list by using the <F3> and <S-F3>
 97 map <F3>    :cnext<CR>
 98 map <S-F3>  :cprevious<CR>
 99 "" Let's help the tab navigation a little
100 map <F4>    :try\|:next\|finish\|catch\|:tabnext\|endtry<CR>
101 map <S-F4>  :bdelete<CR>
102 "" Tlist and NERDTree
103 map <F5>    :NERDTreeToggle<CR>
104 map <S-F5>  :Tlist<CR>
105 set tags=./tags,../tags,../../tags,../../../tags
106 "" open Terminal
107 tmap <F9>   <C-W>:$tabnew +:term<CR><C-W>o
108 map <F9>    :$tabnew +:term<CR><C-W>o
109 
110 

没有评论:

BlockChain 相关电子书

@copyright of Sam Chadwick   - https://thehub.thomsonreuters.com/groups/bitcoin/blog/2017/09/10/blockchain-paper Blockchain Papers A c...