Skip to content

Instantly share code, notes, and snippets.

@chugcup
Created April 30, 2014 20:18
Show Gist options
  • Select an option

  • Save chugcup/0cd9a47e1b6a9cdad73c to your computer and use it in GitHub Desktop.

Select an option

Save chugcup/0cd9a47e1b6a9cdad73c to your computer and use it in GitHub Desktop.
Personal .vimrc
version 6.0
if &cp | set nocp | endif
nmap ,hx wbF^V<df>f^V<df>
nmap ,ht wbi^V<tt>^V^[ea^V</tt>^V^[bb
nmap ,hs wbi^V<strong>^V^[ea^V</strong>^V^[bb
nmap ,hu wbi^V<u>^V^[ea^V</i>^V^[bb
nmap ,hi wbi^V<i>^V^[ea^V</i>^V^[bb
nmap ,he wbi^V<em>^V^[ea^V</em>^V^[bb
nmap ,hb wbi^V<b>^V^[ea^V</b>^V^[bb
nmap ,h6 _i^V<h6>^V^[A^V</h6>^V^[
nmap ,h5 _i^V<h5>^V^[A^V</h5>^V^[
nmap ,h4 _i^V<h4>^V^[A^V</h4>^V^[
nmap ,h3 _i^V<h3>^V^[A^V</h3>^V^[
nmap ,h2 _i^V<h2>^V^[A^V</h2>^V^[
nmap ,h1 _i^V<h1>^V^[A^V</h1>^V^[
nmap ,mh wbgueyei^V<^V^[ea>^V</^V^[pa>^V^[bba
map Q gq
let s:cpo_save=&cpo
set cpo&vim
nmap gx <Plug>NetrwBrowseX
nnoremap <silent> <Plug>NetrwBrowseX :call netrw#NetrwBrowseX(expand("^V<cWORD>"),0)^V^M
let &cpo=s:cpo_save
unlet s:cpo_save
set nocompatible
"syntax on
set backspace=2
set filetype=help
set formatoptions=tcql
set history=50
"This unsets the "last search pattern" register by hitting return
nnoremap <CR> :noh<CR><CR>
set hlsearch
set readonly
set ruler
set shiftwidth=4
set softtabstop=4
set smarttab
set expandtab
set autoindent
set smartindent
set showmatch
set syntax=help
"set textwidth=78
set viminfo='20,\"50
set laststatus=2
set background=dark
"colorscheme ir_black
set list listchars=tab:>-,trail:-
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
autocmd BufRead *.recipe set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
autocmd BufNewFile *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
autocmd BufNewFile *.recipe set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
nnoremap <silent> <F8> :TlistToggle<CR>
inoremap # X^H#
highlight BadWhiteSpace ctermbg=lightred guibg=lightred
match BadWhiteSpace /^\s*\t\s*\|\s\+$/
autocmd WinEnter * match BadWhiteSpace /^\s*\t\s*\|\s\+$/
nmap <C-N> :noh <CR>
function Toggle_paste()
if !exists("s:paste")
let s:paste = 0
endif
let s:paste = (s:paste + 1) % 2
if s:paste == 1
set paste
echo ":set paste"
else
set nopaste
echo ":set nopaste"
endif
endfunction
nmap <C-P> mc<CR>:execute Toggle_paste()<CR>`c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment