set nocompatible
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=0
set smarttab
set smartindent
set autoindent
set ruler
set autoread
set mouse=a
set listchars=tab:>-,trail:-
set statusline=%<%f\ %m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).']['.&ff.']'}%=%l,%c%V%8P
set history=100000
set scrolloff=999
set backspace=indent,eol,start
set showcmd
set ignorecase
set smartcase
set incsearch
set hlsearch
set nowrapscan
set noshowmatch
syntax on
set laststatus=2
set nobackup
set wildmode=list:longest
set hidden
if has("autocmd")
filetype plugin indent on
augroup vimrcEx
au!
autocmd FileType text setlocal textwidth=78
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
augroup END
endif
hi Pmenu ctermbg=Blue
hi PmenuSel ctermbg=Red
set viminfo+=!
runtime ftplugin/man.vim
function! ShebangExecute()
let m = matchlist(getline(1), '#!\(.*\)')
if(len(m) > 2)
execute '!'. m[1] . ' %'
else
execute '!' &ft ' %'
endif
endfunction
nnoremap ,e :call ShebangExecute()<CR>
function InsertTabWrapper()
if pumvisible()
return "\<c-n>"
endif
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k\|<\|/'
return "\<tab>"
elseif exists('&omnifunc') && &omnifunc == ''
return "\<c-n>"
else
return "\<c-x>\<c-o>"
endif
endfunction
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
set pastetoggle=<F9>
nnoremap <F9> :set paste<CR>i
nnoremap ,v :edit ~/.vimrc<CR>
nnoremap ,h :noh<CR>
nnoremap <F10> :NERDTreeToggle<CR>
inoremap <F10> <C-o>:NERDTreeToggle<CR>
nnoremap <F11> :TlistToggle<CR>
inoremap <F11> <C-o>:TlistToggle<CR>
inoremap <C-a> <Home>
inoremap <C-e> <End>
inoremap <C-h> <Left>
inoremap <C-j> <Down>
inoremap <C-k> <Up>
inoremap <C-l> <Right>
inoremap <ESC>b <C-Left>
inoremap <ESC>f <C-Right>
inoremap <C-x> <BS>
inoremap <C-d> <Del>
cnoremap <C-a> <Home>
cnoremap <C-e> <End>
cnoremap <C-b> <Left>
cnoremap <C-f> <Right>
cnoremap <ESC>b <C-Left>
cnoremap <ESC>f <C-Right>
cnoremap <C-h> <BS>
cnoremap <C-d> <Del>
nnoremap j gj
nnoremap k gk
vnoremap j gj
vnoremap k gk