Created
October 8, 2010 08:55
-
-
Save vinod85/616530 to your computer and use it in GitHub Desktop.
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 invpaste | |
set cindent | |
syntax on | |
highlight LineNr term=bold cterm=NONE ctermfg=Red ctermbg=NONE gui=NONE guifg=SteelBlue guibg=NONE | |
set nosm | |
set noshowmatch | |
hi MatchParen ctermfg=Blue ctermbg=black guifg=blue guibg=black | |
set noai | |
set wrap | |
set ts=2 | |
set sw=2 | |
function! ReverseBackground() | |
let Mysyn=&syntax | |
if &bg=="light" | |
se bg=dark | |
else | |
se bg=light | |
endif | |
syn on | |
exe "set syntax=" . Mysyn | |
": echo "now syntax is "&syntax | |
:endfunction | |
function SessionStart() | |
let g:start_writing_time = reltime()[0] | |
let g:keymaster_session = 1 | |
endfunction | |
function GuiStart() | |
execute ":wincmd n" | |
execute ":wincmd r" | |
execute ":windo :set scrollbind" | |
execute ":syncbind" | |
execute ":resize -1" | |
endfunction | |
function CurSessionTime() | |
if !exists("g:keymaster_session") | |
let g:keymaster_session = 0 | |
endif | |
let a:rs = 0 | |
if g:keymaster_session == 1 | |
let a:rs = reltime()[0] - g:start_writing_time | |
endif | |
return "[Typing time : " . a:rs . "s]" | |
endfunction | |
function SessionStop() | |
let a:sec = reltime()[0] - g:start_writing_time | |
let g:keymaster_session = 0 | |
execute ":echo \"[Typing time: \" . (a:sec) . \"s]]\"" | |
endfunction | |
augroup session | |
autocmd! | |
autocmd VimEnter *.keymaster call GuiStart() | |
autocmd InsertEnter * call SessionStart() | |
autocmd InsertLeave * call SessionStop() | |
augroup END | |
map <F2> :windo :set diff | |
map <F3> :windo :set nodiff | |
:command! Inversebackground call ReverseBackground() | |
:noremap <F4> :Inversebackground<CR> | |
set nocompatible | |
filetype plugin on | |
syntax on | |
set nocompatible | |
filetype plugin on | |
syntax on | |
let Tlist_File_Fold_Auto_Close=1 | |
let Tlist_Show_Menu=1 | |
let Tlist_Exit_OnlyWindow=1 | |
let g:miniBufExplMapWindowNavVim = 1 | |
let g:miniBufExplMapWindowNavArrows = 1 | |
let g:miniBufExplMapCTabSwitchBufs = 1 | |
let g:miniBufExplModSelTarget = 1 | |
set tags+=.vim/plugin/tags | |
function! SuperCleverTab() | |
if strpart(getline('.'), 0, col('.') - 1) =~ '^\s*$' | |
return "\<Tab>" | |
else | |
if &omnifunc != '' | |
return "\<C-X>\<C-O>" | |
elseif &dictionary != '' | |
return "\<C-K>" | |
else | |
return "\<C-N>" | |
endif | |
endif | |
endfunction | |
"colorscheme pyte | |
inoremap <Tab> <C-R>=SuperCleverTab()<cr> | |
let g:pydiction_location = '/home/vinod/pydiction-1.2/complete-dict' | |
filetype plugin on | |
let g:pydiction_menu_height = 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment