Feed

dubhead's watching list

  • [521] mru.vim

    Comment 最近使ったファイルの一覧
  • [1910] QuickBuf

    Comment バッファ切り替え。BufExplorerから乗り換えた。シンプルでよい。
  • [273] taglist.vim

    Comment 定番。他人の長いコードを読むときによく使う。

Profile

コードにはvi、文書にはEmacs、ともに使用歴20年のオールドタイプ。 http://playrecord.org/

.vimrc

" ~/.vimrc

" language settings
let $LANG = 'en'
language en_US.UTF-8
set ambiwidth=double
set encoding=utf-8
set fileencoding=utf-8
if has('iconv')
set fileencodings=utf-8,cp932,iso-2022-jp,euc-jp
endif

set autochdir
set autoindent
set backspace=indent,eol,start
" set backupdir=c:\\tmp,.
set backupdir=~/.Trash,.,~/
set browsedir=current
set cinoptions=:0,g0
" set directory=c:\\tmp,.
set directory=/tmp,~/.Trash,~/,.
" set grepprg=internal
set history=50
set hidden
set hlsearch
set incsearch
set isfname-==
set langmenu=none
set linebreak
set nrformats=hex,alpha
set noruler
set secure
set sessionoptions=options,curdir,winpos,resize,winsize
set shiftwidth=4
set shortmess=aoOtI
set showbreak=>\
set noshowcmd
set shiftround
set showmatch
set noshowmode
set splitbelow
set suffixes=~,.o,swp,.orig,.pyc,.pyo,.beam,.class,.exe
set tags=./tags;
set tildeop
set viminfo=!,'0,\"0,@0,f0,h " '!' for mru.vim
set nowrapscan
set wildmode=longest,list
set winfixheight

" these should be here, NOT in .gvimrc
" default: "agimrLtT" (GTK, Motif and Athena)
set guioptions-=T
set guioptions-=r
set guioptions-=L
set guioptions-=m
set guioptions+=cl

syntax on
" colorscheme fine_blue
" colorscheme fruit
" colorscheme autumnleaf
colorscheme vc
" colorscheme delek

" always cd to the directory where the current file is at
"
" This is enough if you never edit network files:
" autocmd BufEnter * lcd %:p:h
"
" from Vim Online, Tip #370
" autocmd BufEnter * if bufname("") !~ "^\[A-Za-z0-9\]://" | silent! lcd %:p:h | endif
"
" This is obsolete in ver6.2 -- use new option 'autochdir'.

" BufExplorer (taken from Vim Online). Sort by most recently used.
" map <silent> _ :BufExplorer<CR>
" let g:bufExplorerSortBy='fullPath' " Sort by full file path name.

" QuickBuf http://www.vim.org/scripts/download_script.php?src_id=7198
let g:qb_hotkey = "_"

" Highlight redundant whitespaces.
highlight RedundantSpaces ctermbg=red guibg=red
match RedundantSpaces /\s\+$\| \+\ze\t/

" Highlight 'number' column.
highlight LineNr term=underline ctermbg=3 ctermfg=4 guifg=blue guibg=yellow

" java.vim options
let java_highlight_all=1
let java_highlight_debug=1
" let java_highlight_java_lang_ids=1
" let java_allow_cpp_keywords=1
let java_space_errors=1
" let java_highlight_functions="style"

" javac (Sun JDK)
" Note: This sets 'shellpipe=2>', disabling the grep/quickfix feature.
" autocmd BufNewFile,BufRead *.java compiler javac

" taglist.vim options
" let Tlist_Ctags_Cmd = "/usr/local/bin/exctags"
let Tlist_Ctags_Cmd = "/usr/bin/ctags-exuberant"
" let Tlist_Inc_Winwidth = 0

" mru.vim options (note: requires '!' in viminfo)
let MRU_Max_Entries = 50
let MRU_Exclude_Files = '^/tmp/.*\|^/var/tmp/.*'
let MRU_Window_Height = 16
" let MRU_Use_Current_Window = 1
" let MRU_Auto_Close = 0

" Toggle read-only for local buffer.
map <C-Q> :silent setl invreadonly<CR>\|:setl readonly?<CR>

" Ctrl-L also clears searched-word hilighting.
noremap <C-L> :noh<CR>:lcd %:p:h<CR><C-L>

" from vim.org Tip #1030
function! s:DiffWithSaved()
diffthis
new | r # | normal 1Gdd
diffthis
setlocal bt=nofile bh=wipe nobl noswf ro
endfunction
com! Diff call s:DiffWithSaved()

" Python
autocmd FileType python setl expandtab
let python_highlight_all = 1 " See syntax/python.vim

" eof