Skip to content

Commit

Permalink
minor vimrc changes, formatting,..
Browse files Browse the repository at this point in the history
  • Loading branch information
milomouse (Vincent Anonymouse) committed Jul 3, 2011
1 parent a85b96d commit 7a65296
Showing 1 changed file with 32 additions and 18 deletions.
50 changes: 32 additions & 18 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
syntax enable
" ${XDG_CONFIG_HOME:-${HOME}}/.vimrc
" author: milomouse <vincent[at]fea.st>
" update: 2011-07-03

" ViM + ZSH + UTF-8
set nocompatible
set shell=zsh
"no sense setting this by default; only when X enters qwerty/ru
"set keymap=russian-dvorak
set enc=utf-8
set viminfo='20,<50,s10,h,n~/.vim/viminfo

" Display
if $DISPLAY =~ ":"
set t_Co=256
endif
syntax enable
colorscheme cottonmouse
set shortmess=aTItoO
set statusline=[%n]\ %<%f%m%r\ %w\ %y\ \ <%{&fileformat}>%=[%o]\ %l,%c%V\/%L\ \ %P
"if has ('folding')
" set foldenable
" set foldmethod=marker
" set foldmarker={{{,}}}
" set foldcolumn=0
"endif

" Settings
set nocursorline
set nocursorcolumn
set ignorecase
Expand All @@ -40,6 +48,8 @@ set splitright
set wildmode=list:longest,full
set showmode
set showcmd
set list!
set listchars=trail:·,precedes:«,extends:»
set scrolloff=2
set laststatus=2
set ruler
Expand All @@ -51,8 +61,9 @@ set nomodeline
set backup
set backupdir=/tmp/.1009/vim/backups,.
set directory=/tmp/.1009/vim/swapfiles,.
set shortmess=aTItoO
set statusline=[%n]\ %<%f%m%r\ %w\ %y\ \ <%{&fileformat}>%=[%o]\ %l,%c%V\/%L\ \ %P
set viminfo='20,<50,s10,h,n~/.vim/viminfo

" Filetypes
set grepprg=grep\ -nH\ $*
autocmd BufNewFile,BufRead ~H/rite/mine/* set ft=txt | set wrap | set spell
autocmd BufNewFile,BufRead ~H/mail/* set ft=mail | set textwidth=72 | set spell
Expand All @@ -72,20 +83,29 @@ autocmd FileType python set expandtab shiftwidth=2 tabstop=2
autocmd FileType c syn match matchName /\(#define\)\@<= .*/
autocmd FileType cpp syn match matchName /\(#define\)\@<= .*/
autocmd FileType mail set tw=64 autoindent expandtab formatoptions=tcqn
autocmd FileType mail set list listchars=tab:»·,trail:·
autocmd FileType mail set comments=nb:>
autocmd FileType mail set list listchars=tab:--,trail:·,precedes:«,extends:»
autocmd FileType mail vmap D d0[...]^[
autocmd FileType mail silent normal /--\s*$^M0^[gg/^$^Mj
filetype on
filetype indent off
filetype plugin indent off

" Allowance
let g:GPGUseAgent = 1
let g:netrw_http_cmd = 'w3m'
let g:netrw_http_xcmd = '-dump >'
let g:tex_flavor = "latex"
let python_space_errors = 1
let ruby_space_errors = 1
let g:tex_conceal = 1
let c_space_errors = 1
let c_no_trail_space_error = 1
let c_no_tab_space_error = 1
let java_space_errors = 1
let python_space_errors = 1
let ruby_space_errors = 1
let space_no_jump = 1

" [un-]Mappings
map <Up> <NOP>
map <Down> <NOP>
map <Left> <NOP>
Expand All @@ -96,12 +116,6 @@ inoremap # X<BS>#
nnoremap q: <Nop>
nnoremap q/ <Nop>
nnoremap q? <Nop>
" MapToggle from p.brisbin's vimrc
function MapToggle(key, opt)
let cmd = ':set '.a:opt.'! \| set '.a:opt."?\<CR>"
exec 'nnoremap '.a:key.' '.cmd
exec 'inoremap '.a:key." \<C-O>".cmd
endfunction
command -nargs=+ MapToggle call MapToggle(<f-args>)
"MapToggle <F8> number
"MapToggle <F11> foldenable
" Workarounds
autocmd BufWinLeave * call clearmatches() " Fix progressive memory leak on match when switching buffers

0 comments on commit 7a65296

Please sign in to comment.