Skip to content

Instantly share code, notes, and snippets.

@ljcucc
Last active September 21, 2018 14:19
Show Gist options
  • Save ljcucc/e00211e8e74c66c484df514041f30f50 to your computer and use it in GitHub Desktop.
Save ljcucc/e00211e8e74c66c484df514041f30f50 to your computer and use it in GitHub Desktop.
vimrc for windows
syntax on
" Enable xTerm in windows
if has('win32') && !has('gui_running') && !empty($CONEMUBUILD)
set term=xterm
set t_Co=256 "init 256 color support
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
colorscheme monokai "source : https://github.com/crusoexia/vim-monokai
inoremap <Char-0x07F> <BS> "Make backspace work in ConEmu
nnoremap <Char-0x07F> <BS>
endif
inoremap {<cr> {<cr>}<c-o><s-o> "Auto create paren in vim
inoremap [<cr> [<cr>]<c-o><s-o>
inoremap (<cr> (<cr>)<c-o><s-o>
set number "display line number
set clipboard=unnamed "make copy to system
set tabstop=2 " The width of a TAB is set to 4.
set shiftwidth=2 " Indents will have a width of 4.
set softtabstop=2 " Sets the number of columns for a TAB.
set expandtab " Expand TABs to spaces.
"disable vim system file auto creating or saving
set viminfo+=n$HOME "(optional) set vim info to $HOME path to make the saving no root in windows
set nobackup "(required) make vim no backup auto creating
set noswapfile "(required) make vim no swap file auto creating
set noundofile "(required) make undo file disable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment