Last active
May 23, 2017 08:19
-
-
Save tkuriyama/bbb17cd71c165a3c82a46f148044de83 to your computer and use it in GitHub Desktop.
vim config
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
""" Plugins https://github.com/tpope/vim-pathogen | |
execute pathogen#infect() | |
""" General UI | |
" line numbers | |
set number | |
" Turn on the WiLd menu | |
set wildmenu | |
" Ignore compiled files | |
set wildignore=*.o,*~,*.pyc | |
if has("win16") || has("win32") | |
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store | |
else | |
set wildignore+=.git\*,.hg\*,.svn\* | |
endif | |
" Configure backspace so it acts as it should act | |
set backspace=eol,start,indent | |
set whichwrap+=<,>,h,l | |
" Ignore case when searching | |
set ignorecase | |
" When searching try to be smart about cases. | |
set smartcase | |
" Highlight search results | |
set hlsearch | |
" Makes search act like search in modern browsers | |
set incsearch | |
" Don't redraw while executing macros (good performance config) | |
set lazyredraw | |
" For regular expressions turn magic on | |
set magic | |
" No annoying sound on errors | |
set noerrorbells | |
set novisualbell | |
set t_vb= | |
set tm=500 | |
""" Colors and Fonts | |
" Set utf8 as standard encoding | |
set encoding=utf8 | |
" Use Unix as the standard file type | |
set ffs=unix,dos,mac | |
" Enable syntax highlighting | |
syntax enable | |
" font | |
""" Text, Tab. Indent | |
" Use spaces instead of tabs | |
set expandtab | |
" Be smart when using tabs | |
set smarttab | |
" 1 tab == 4 spaces | |
set shiftwidth=4 | |
set tabstop=4 | |
" Linebreak on 500 characters | |
set lbr | |
set tw=500 | |
set ai "Auto indent | |
set si "Smart indent | |
set wrap "Wrap lines | |
" whitespace display | |
set listchars=trail:.,tab:>- | |
set list | |
highlight SpecialKey ctermfg=darkgray | |
""" Key Mappings | |
map < gT | |
map > gt | |
""" Backups | |
" No backups | |
set nobackup | |
set nowb | |
set noswapfile | |
""" Status Line | |
" Always show the status line | |
set laststatus=2 | |
" Format the status line | |
set statusline= | |
set statusline+=%<\ " cut at start | |
set statusline+=%2*[%n%H%M%R%W]%*\ " flags and buf no | |
set statusline+=%-40f\ " path | |
set statusline+=%{HasPaste()} | |
set statusline+=%=%1*%y%*%*\ " file type | |
set statusline+=%10((%l,%c)%)\ " line and column | |
set statusline+=%P " percentage of file | |
""" Helpers | |
" Returns true if paste mode is enabled | |
function! HasPaste() | |
if &paste | |
return 'PASTE MODE ' | |
endif | |
return '' | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment