Skip to content

Instantly share code, notes, and snippets.

@codebylove
Created November 24, 2012 07:45
Show Gist options
  • Select an option

  • Save codebylove/4138807 to your computer and use it in GitHub Desktop.

Select an option

Save codebylove/4138807 to your computer and use it in GitHub Desktop.
vim config
"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