Skip to content

Instantly share code, notes, and snippets.

@Soft
Created April 8, 2010 08:23
Show Gist options
  • Save Soft/359898 to your computer and use it in GitHub Desktop.
Save Soft/359898 to your computer and use it in GitHub Desktop.
Some old .vimrc
set nocompatible
if has("gui_win32")
source $VIMRUNTIME/mswin.vim
behave mswin
endif
syntax on
set t_Co=256
colorscheme herald
set number
set nowrap
set ruler
set tabstop=4
set shiftwidth=4
set smarttab
set smartindent
set autoindent
set noerrorbells
set visualbell
set t_vb=
filetype plugin indent on
nmap <C-l> :bnext<CR>
nmap <C-h> :bprev<CR>
imap jj <Esc>
imap <CR> <Esc>
set laststatus=2
set wildmenu
set foldenable
set hidden
set scrolloff=10
set sidescrolloff=10
set autochdir
" Paste
nnoremap <F2> :set invpaste paste?
imap <F2> <C-0><F2>
set pastetoggle=<F2>
" Search
set ignorecase
set smartcase
set incsearch
set history=50
" Arrow keys change buffers and tabs
inoremap <silent> <left> <nop>
inoremap <silent> <right> <nop>
inoremap <silent> <up> <nop>
inoremap <silent> <down> <nop>
nnoremap <silent> <left> :bprevious<CR>
nnoremap <silent> <right> :bnext<CR>
nnoremap <silent> <up> :tabnext<CR>
nnoremap <silent> <down> :tabprevious<CR>
set encoding=utf-8
cd ~
if has("gui_running")
set guioptions-=T " No toolbar
set guioptions-=t " No tearoff menus
set guifont=Terminus
set columns=150
set lines=50
au! GuiEnter * set t_vb=
endif
if has("statusline")
" Custom status line
set statusline= " clear the statusline for when vimrc is reloaded
set statusline+=%f\ " file name
set statusline+=%-2.2n " buffer
set statusline+=[%{strlen(&ft)?&ft:'none'}, " filetype
set statusline+=%{strlen(&fenc)?&fenc:&enc}, " encoding
set statusline+=%{&fileformat}] " file format
set statusline+=%h%m%r%w " flags
set statusline+=%= " left/right separator
set statusline+=%c,%l/ " cursor column/total lines
set statusline+=%L\ %P " total lines/percentage in file
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment