Skip to content

Instantly share code, notes, and snippets.

@southp
Last active December 11, 2015 14:58
Show Gist options
  • Save southp/4618051 to your computer and use it in GitHub Desktop.
Save southp/4618051 to your computer and use it in GitHub Desktop.
my noob gvimrc for windows
language mes en
map <F2> :TlistToggle<CR>
map <F3> :FufTag<CR>
map <C-f> :FufFile ./**/<CR>
nmap <C-_>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-_>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-_>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-_>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-_>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-_>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-_>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-_>d :cs find d <C-R>=expand("<cword>")<CR><CR>
nnoremap k gk
nnoremap j gj
set path+=./**
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'bufexplorer.zip'
Bundle 'majutsushi/tagbar'
set nobackup
set ruler
set showcmd
set undolevels=1000
set history=50
set backspace=indent,eol,start
set shiftwidth=4
set tabstop=4
set expandtab
set nu
set fileencodings=ucs-bom,utf-8,taiwan,prc
set encoding=utf-8
set showmatch
set hlsearch
set incsearch
set ignorecase
set guifont=courier_new:h14
syntax enable
:colorscheme wintersday
set autoindent
filetype plugin indent on
" show tab number on the tab. From vim.wikia.com
set showtabline=2 " always show tabs in gvim, but not vim
" set up tab labels with tab number, buffer name, number of windows
function! GuiTabLabel()
let label = ''
let bufnrlist = tabpagebuflist(v:lnum)
" Add '+' if one of the buffers in the tab page is modified
for bufnr in bufnrlist
if getbufvar(bufnr, "&modified")
let label = '+'
break
endif
endfor
" Append the tab number
let label .= v:lnum.': '
" Append the buffer name
let name = bufname(bufnrlist[tabpagewinnr(v:lnum) - 1])
if name == ''
" give a name to no-name documents
if &buftype=='quickfix'
let name = '[Quickfix List]'
else
let name = '[No Name]'
endif
else
" get only the file name
let name = fnamemodify(name,":t")
endif
let label .= name
" Append the number of windows in the tab page
let wincount = tabpagewinnr(v:lnum, '$')
return label . ' [' . wincount . ']'
endfunction
set guitablabel=%{GuiTabLabel()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment