Created
November 24, 2012 07:45
-
-
Save codebylove/4138807 to your computer and use it in GitHub Desktop.
vim config
This file contains hidden or 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 mouse=a " Enable mouse usage (all modes) | |
| set bs=indent,eol,start " allow backspacing over everything in insert mode | |
| "set ai " always set autoindenting on | |
| set si " always smartindent | |
| set tabstop=4 " tab spacing (settings below are just to unify it) | |
| set softtabstop=4 " unify | |
| set shiftwidth=4 " unify | |
| set expandtab " real tabs please! | |
| " set nowrap " do not wrap lines | |
| set smarttab " use tabs at the start of a line, spaces elsewhere | |
| set pastetoggle=<F3> | |
| set copyindent " copy the previous indentation on autoindenting | |
| set backspace=indent,eol,start | |
| " allow backspacing over everything in insert mode | |
| set shiftround " use multiple of shiftwidth when indenting with '<' and '>' | |
| colorscheme desert | |
| "Enable and disable mouse use | |
| noremap <f2> :call ToggleMouse() <CR> | |
| function! ToggleMouse() | |
| if &mouse == 'a' | |
| set mouse= | |
| "set nonumber | |
| echo "Mouse usage disabled" | |
| else | |
| set mouse=a | |
| "set number | |
| echo "Mouse usage enabled" | |
| endif | |
| endfunction | |
| " Source a global configuration file if available | |
| if filereadable("/etc/vim/vimrc.local") | |
| source /etc/vim/vimrc.local | |
| endif | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment