Skip to content

Instantly share code, notes, and snippets.

@chetan
Last active December 13, 2015 18:49
Show Gist options
  • Save chetan/4958387 to your computer and use it in GitHub Desktop.
Save chetan/4958387 to your computer and use it in GitHub Desktop.
minimal .vimrc for server-side editing
colors desert
syntax enable
set noai
set softtabstop=2
set tabstop=2
set shiftwidth=2
set noexpandtab
set backspace=2
set smarttab
set et
" set number " uncomment to enable line numbers
set nocompatible
set backspace=indent,eol,start
filetype indent on
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
set hlsearch " highlight search results
" Toggle paste mode
nnoremap \tp :set invpaste paste?<CR>
nmap <F4> \tp
imap <F4> <C-O>\tp
set pastetoggle=<F4>
map <Up> gk
map <Down> gj
" When editing a file, always jump to the last known cursor position.
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal g'\"" | endif
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment