Created
April 4, 2012 04:48
-
-
Save sakti/2297863 to your computer and use it in GitHub Desktop.
My personal .vimrc file
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
set ignorecase | |
set modelines=0 | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
set encoding=utf-8 | |
set scrolloff=3 | |
set showmode | |
set showcmd | |
set hidden | |
set wildmenu | |
set wildmode=list:longest | |
set nocursorline | |
set ttyfast | |
set ruler | |
set backspace=indent,eol,start | |
set laststatus=2 | |
set number | |
set wrap | |
set textwidth=79 | |
set formatoptions=qrnl | |
nmap <leader>l :set list!<CR> | |
set listchars=tab:▸\ ,eol:¬ | |
set hls | |
set list | |
syntax enable | |
if has('gui_running') | |
set background=light | |
else | |
set background=dark | |
endif | |
set background=light | |
set t_Co=16 | |
let g:solarized_termcolors=16 | |
colorscheme solarized | |
set guifont=Monaco | |
filetype plugin indent on | |
if has("autocmd") | |
autocmd BufWritePre *.py,*.js,*.html,*.php :call <SID>StripTrailingWhitespaces() | |
endif | |
nnoremap <silent> <F5> :call <SID>StripTrailingWhitespaces()<CR> | |
function! <SID>StripTrailingWhitespaces() | |
let _s=@/ | |
let l = line(".") | |
let c = col(".") | |
%s/\s\+$//e | |
let @/=_s | |
call cursor(l,c) | |
endfunction | |
map <C-h> <C-w>h | |
map <C-j> <C-w>j | |
map <C-k> <C-w>k | |
map <C-l> <C-w>l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment