augroup vim7highlightCurrentLineInActiveWindow
au WinEnter * if g:HighlightCurrentLine | setlocal cul | endif
au WinLeave * if g:HighlightCurrentLine | setlocal nocul | endif
augroup end
function! s:ToggleHighlightCurrentLine()
if !exists('g:HighlightCurrentLine') || g:HighlightCurrentLine==0
setlocal cul
let g:HighlightCurrentLine=1
else
setlocal nocul
let g:HighlightCurrentLine=0
endif
endfunction
command! ToggleHighlightCurrentLine :call <sid>ToggleHighlightCurrentLine()
call <sid>ToggleHighlightCurrentLine()
More information.
Wednesday, May 21, 2008
Tuesday, May 13, 2008
Set External Diff of SVN as gvimdiff (ubuntu)
SVN Config: /etc/subversion/config
diff-cmd = /home/username/diffwrap.sh
diffwrap.sh (make sure it's executable.)
#!/bin/sh
# Configure your favorite diff program here.
DIFF="/usr/bin/gvimdiff"
# Subversion provides the paths we need as the sixth and seventh
# parameters.
LEFT=${6}
RIGHT=${7}
# Call the diff command (change the following line to make sense for
# your merge program).
$DIFF $LEFT $RIGHT
# Return an errorcode of 0 if no differences were detected, 1 if some were.
# Any other errorcode will be treated as fatal.
diff-cmd = /home/username/diffwrap.sh
diffwrap.sh (make sure it's executable.)
#!/bin/sh
# Configure your favorite diff program here.
DIFF="/usr/bin/gvimdiff"
# Subversion provides the paths we need as the sixth and seventh
# parameters.
LEFT=${6}
RIGHT=${7}
# Call the diff command (change the following line to make sense for
# your merge program).
$DIFF $LEFT $RIGHT
# Return an errorcode of 0 if no differences were detected, 1 if some were.
# Any other errorcode will be treated as fatal.
Monday, May 12, 2008
Set External Diff of SVN as gvimdiff (Windows)
svn config (usually in: c:\Document and Settings\Application\Subversion\config)
diff-cmd = c:/diffwrap.bat
c:/diffwrap.bat
@ECHO OFF
REM Configure your favorite diff program here.
SET DIFF="C:\Program Files\Vim\vim71\gvim.exe"
REM Subversion provides the paths we need as the sixth and seventh REM parameters.
SET LEFT=%6
SET RIGHT=%7
REM Call the diff command (change the following line to make sense for
REM your merge program).
%DIFF% -d %LEFT% %RIGHT%
REM Return an errorcode of 0 if no differences were detected, 1 if some were.
REM Any other errorcode will be treated as fatal.
vim diff option
set diffopt+=iwhite
set diffopt+=horizontal
diff-cmd = c:/diffwrap.bat
c:/diffwrap.bat
@ECHO OFF
REM Configure your favorite diff program here.
SET DIFF="C:\Program Files\Vim\vim71\gvim.exe"
REM Subversion provides the paths we need as the sixth and seventh REM parameters.
SET LEFT=%6
SET RIGHT=%7
REM Call the diff command (change the following line to make sense for
REM your merge program).
%DIFF% -d %LEFT% %RIGHT%
REM Return an errorcode of 0 if no differences were detected, 1 if some were.
REM Any other errorcode will be treated as fatal.
vim diff option
set diffopt+=iwhite
set diffopt+=horizontal
Monday, May 05, 2008
Subscribe to:
Posts (Atom)

