Skip to content

Instantly share code, notes, and snippets.

@gengjiawen
Last active June 6, 2020 02:37
Show Gist options
  • Save gengjiawen/dcce7a75989581f78a28 to your computer and use it in GitHub Desktop.
Save gengjiawen/dcce7a75989581f78a28 to your computer and use it in GitHub Desktop.
my vim configuration
" gengjiawen's configuration
source $VIMRUNTIME/mswin.vim
behave mswin
" keep history
set history=1000
"set backup
set nobackup
"line control
set linebreak
set nocompatible
set textwidth=80
set wrap
set number
"set intent
set autoindent
set smartindent
set incsearch
"set tab
set tabstop=4
set expandtab
set smarttab
set shiftwidth=4
set softtabstop=4
set tabpagemax=10
set showtabline=2
set guitablabel=%t
nmap <C-t> :tabnew<cr>
nmap <C-Tab> :tabn<CR>
nmap <C-S-Tab> :tabp<CR>
for i in range(1, &tabpagemax)
exec 'nmap <A-'.i.'> '.i.'gt'
endfor
syntax on
set paste
set showcmd
if has("win32")
" font settign
exec 'set guifont='.iconv('Consolas', &enc, 'gbk').':h10:cANSI'
" maximum gvim window size when start
au GUIEnter * simalt ~x
endif
"Jump to last cursor postion unless it's invaldi or in an event handler
:au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment