Last active
April 28, 2016 17:15
-
-
Save kitroed/918506 to your computer and use it in GitHub Desktop.
my work .gvimrc file
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
set colorcolumn=85 | |
:imap <C-BS> <C-W> | |
"call pathogen#runtime_append_all_bundles() | |
syntax enable | |
colorscheme desert | |
set background=dark | |
colorscheme solarized | |
"match Todo /\s\+$/ " highlight trailing whitespace | |
"tab keyboard shortcuts | |
nnoremap <C-N> :tabnew<CR> | |
nnoremap <C-TAB> :tabnext<CR> | |
nnoremap <C-S-TAB> :tabprevious<CR> | |
"F3 toggles wrap and scroll | |
nnoremap <silent><expr> <F3> ':set wrap! go'.'-+'[&wrap]."=b\r" | |
"F5 toggles gundo | |
nnoremap <F5> :GundoToggle<CR> | |
"F6 toggles spellcheck | |
nnoremap <silent> <F6> <ESC><ESC>:set spell!<CR> | |
"F7 to process the current doc as Markdown | |
" without the extension (:r), with the end of the string ($) replaced with .htm. The comma (,) is a delimiter for the substitute (:s) | |
"nnoremap <silent> <F7> <ESC><ESC>:!start cmd /c markdown_py -q % -f %:r:s,$,.htm, && %:r:s,$,.htm,<CR> | |
nnoremap <silent> <F7> <ESC><ESC>:!start cmd /c pandoc.exe % -s -o %:r:s,$,.htm, && %:r:s,$,.htm,<CR> | |
"F8 Toggles Tlist | |
nnoremap <silent> <F8> :TlistToggle<CR> | |
set autoindent " always set autoindenting on | |
set backspace=indent,eol,start " allow backspacing over everything in insert mode | |
set columns=137 | |
set copyindent " copy the previous indentation on autoindenting | |
set cursorline | |
set expandtab | |
set formatoptions=1 | |
set guifont=Monospace | |
set guifont=Source_Code_Pro_Medium:h9:cANSI | |
if has('gui_running') | |
set guioptions-=T " Get rid of toolbar " | |
set guioptions-=b " disable horizontal scrollbar | |
"set guioptions+=b " enable horizontal scrollbar | |
endif | |
set hlsearch " highlight search terms | |
set incsearch " show search matches as you type | |
set ignorecase " ignore case when searching | |
set laststatus=2 | |
set lbr " line break at whitespace character | |
set lines=50 | |
set listchars=tab:»\ ,eol:¬,trail:· | |
set nobackup | |
set nohidden " when a tab is closed, remove the buffer | |
set noswapfile | |
set number " always show line numbers | |
"set relativenumber | |
"setglobal relativenumber | |
set ruler | |
set scrolloff=3 | |
set shiftround " use multiple of shiftwidth when indenting with '<' and '>' | |
set shiftwidth=4 " number of spaces to use for autoindenting | |
set showcmd | |
set showmatch " set show matching parenthesis | |
set showbreak=«·\ ·\ ·\ · " visible indentation of wrapped lines | |
" visible indentation of wrapped lines | |
set showmode | |
set smartcase " ignore case if search pattern is all lowercase, case-sensitive otherwise | |
set smarttab " insert tabs on the start of a line according to shiftwidth, not tabstop | |
set tabstop=4 | |
set ttyfast | |
set undofile | |
set undodir=~/.vimundo | |
set wildmenu | |
set wildmode=list:longest | |
filetype on " Enable filetype detection | |
filetype indent on " Enable filetype-specific indenting | |
filetype plugin on " Enable filetype-specific plugins | |
function ShowSpaces(...) | |
let @/='\v(\s+$)|( +\ze\t)' | |
let oldhlsearch=&hlsearch | |
if !a:0 | |
let &hlsearch=!&hlsearch | |
else | |
let &hlsearch=a:1 | |
end | |
return oldhlsearch | |
endfunction | |
function TrimSpaces() range | |
let oldhlsearch=ShowSpaces(1) | |
execute a:firstline.",".a:lastline."substitute ///gec" | |
let &hlsearch=oldhlsearch | |
endfunction | |
command -bar -nargs=? ShowSpaces call ShowSpaces(<args>) | |
command -bar -nargs=0 -range=% TrimSpaces <line1>,<line2>call TrimSpaces() | |
nnoremap <F12> :ShowSpaces 1<CR> | |
nnoremap <S-F12> m`:TrimSpaces<CR>`` | |
vnoremap <S-F12> :TrimSpaces<CR> | |
au BufNewFile,BufRead *.prg set filetype=foxpro | |
if has("multi_byte") | |
if &termencoding == "" | |
let &termencoding = &encoding | |
endif | |
set encoding=utf-8 " better default than latin1 | |
setglobal fileencoding=utf-8 " change default file encoding when writing new files | |
endif | |
"open each buffer in its own tabpage | |
"au BufAdd,BufNewFile,BufRead * nested tab sball | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment