Last active
August 18, 2016 06:53
-
-
Save wenchy/57dc2c83524c169d4abfd7cbb03066cc to your computer and use it in GitHub Desktop.
A simple and useful VIM configuration with no plugins but only a solarized colorscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""""""""""""""""""""""""""""""""""""""""" | |
""" Pre: Get the solarized colorscheme | |
""" mv solarized.vim ~/.vim/colors/ | |
"""""""""""""""""""""""""""""""""""""""""" | |
""" Be iMproved | |
set nocompatible | |
syntax enable | |
" syntax on | |
" set t_Co=256 | |
""" Xshell bug for solarized colorscheme | |
set t_Co=8 | |
set background=dark | |
" let g:solarized_termcolors=256 | |
colorscheme solarized | |
" colorscheme desert | |
""" File encodings | |
set fileencodings=utf-8,gbk,big5 | |
""" C/C++ language indent | |
set cin | |
set sw=4 | |
set sm | |
""" Softtabs | |
set ts=4 | |
set softtabstop=4 | |
""" Auto indent | |
set autoindent | |
set smartindent | |
set shiftround | |
set shiftwidth=4 | |
""" Show line number | |
set nu | |
""" F2 switch on/off for number | |
nnoremap <F2> :set nonumber!<CR> | |
""" Search | |
set hlsearch | |
set matchpairs+=<:> | |
set incsearch | |
""" Highlight current line | |
" au WinLeave * set nocursorline nocursorcolumn | |
" au WinEnter * set cursorline nocursorcolumn | |
" set cursorline cursorcolumn | |
""" Smart completion | |
set completeopt=longest,menu | |
""" auto-completion for | |
""" quotes, parens, brackets, etc. | |
:inoremap ( ()<ESC>i | |
:inoremap { {<CR>}<ESC>O | |
:inoremap [ []<ESC>i | |
" :inoremap < <><ESC>i | |
:inoremap " ""<ESC>i | |
:inoremap ' ''<ESC>i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment