Created
October 25, 2011 15:34
-
-
Save runningskull/1313150 to your computer and use it in GitHub Desktop.
This file contains 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
let mapleader = "," | |
syn on | |
set nocompatible | |
set ai | |
set si | |
set et | |
set sts=4 | |
set ts=4 | |
set sw=4 | |
set nu | |
set smarttab | |
set nowrap | |
set foldmethod=indent | |
set foldnestmax=2 | |
set smartcase | |
set incsearch | |
" I am sloppy and lazy | |
imap <F1> <Esc> | |
" Emacs, anyone? | |
inoremap <c-x><c-s> <esc>:w<cr>a | |
" Don't suck | |
set completeopt=longest,menuone | |
set bs=2 " make backspace delete everything | |
"inoremap <backspace> <left><delete> | |
set wildmode=list:longest | |
set wildignore=*.pyc,.git | |
inoremap <s-tab> <c-x><c-n><down> | |
inoremap <c-j> <down> | |
inoremap <c-k> <up> | |
inoremap <c-backspace> <esc>dBs | |
" Quick opening and buffer switching and alternating | |
noremap \ :ls<cr>:b<space> | |
noremap Z :b#<cr> | |
" Folding help | |
noremap <s-tab> za | |
noremap <s-cr> zA | |
noremap <leader>ff zA | |
noremap <leader>fa zM | |
noremap <leader>fc zR | |
set background=dark | |
let psc_fontface='mixed' | |
let psc_style='cool' | |
colo solarized | |
"colo ps_color | |
"highlight Normal guibg=#181818 guifg=#e0e0e0 | |
""" A little custom matching | |
inoremap '' ''<esc>i | |
inoremap "" ""<esc>i | |
inoremap <s-cr> <cr><backspace><esc>O | |
inoremap <c-]> <esc>A | |
inoremap <c-l> <esc>/["')]<cr>a | |
inoremap ( ()<left> | |
inoremap () () | |
inoremap { {}<left> | |
inoremap [ []<left> | |
inoremap %% {% %}<left><left><left> | |
"""" Testing | |
let g:vimsh_sh = '/bin/bash' | |
command! SH so ~/.vim/vimsh/vimsh.vim | |
autocmd BufRead,BufNewFile *.lsp,*.lisp so ~/.vim/VIlisp/VIlisp.vim | |
"autocmd BufWritePre * :%s/\s\+$//e | |
command! WRAP set formatoptions=l|set lbr|map j gj|map k gk | |
function! Kwbd(kwbdStage) | |
if(a:kwbdStage == 1) | |
let g:kwbdBufNum = bufnr("%") | |
let g:kwbdWinNum = winnr() | |
windo call Kwbd(2) | |
execute "bd! " . g:kwbdBufNum | |
execute "normal " . g:kwbdWinNum . "" | |
else | |
if(bufnr("%") == g:kwbdBufNum) | |
let prevbufvar = bufnr("#") | |
if(prevbufvar > 0 && buflisted(prevbufvar) && prevbufvar != g:kwbdBufNum) | |
b # | |
else | |
bn | |
endif | |
endif | |
endif | |
endfunction | |
command! BD call Kwbd(1) | |
let g:netrw_browse_split=4 | |
let g:html_use_css = 1 | |
let g:html_use_encoding = "utf-8" | |
let g:html_use_xhtml = 1 | |
" NERDTree | |
noremap \| :NERDTreeToggle<cr> | |
let NERDTreeIgnore=['\.vim$', '\~$', '\.pyc'] | |
" Git | |
noremap <c-g> :!git<space> | |
" Open projects quickly | |
noremap <c-o> :so ~/projects/vimprj/ | |
" Move+resize window splits | |
set noequalalways | |
noremap <c-h> <c-w>h | |
noremap <c-l> <c-w>l | |
noremap <c-j> <c-w>j | |
noremap <c-k> <c-w>k | |
" Comment me on big screen | |
noremap <c-h> <c-w>h:vertical res 120<cr> | |
noremap <c-l> <c-w>l:vertical res 120<cr> | |
noremap <c-j> :res 10<cr><c-w>j | |
noremap <c-k> :res 10<cr><c-w>k | |
noremap <c-Up> :res +5<cr> | |
noremap <c-Down> :res -5<cr> | |
noremap <c-Right> :vertical res +10<cr> | |
noremap <c-Left> :vertical res -10<cr> | |
" Status Bar | |
set statusline=%F%m%r%h%w\ [POS=%04l,%04v][%p%%]\ [LEN=%L] | |
set laststatus=2 | |
" Close HTML Tags | |
inoremap /<tab> </<c-x><c-o><esc>a | |
" Ack | |
noremap <c-f> :Ack<space> | |
" Highlight columns past 80 | |
hi OverLength guibg=#3a3510 | |
match OverLength /\%81v.\+/ | |
filetype plugin on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment