- about:config in address bar
- Set "browser.ctrlTab.previews" to "true" (double-click)
Thursday, May 22, 2014
Changing Firefox Tab Cycle Order
Wednesday, May 21, 2014
svn diff wrapper for vim with correct file names
#!/bin/sh
# use vimdiff to view diffs
DIFF="/usr/bin/vim -d -R"
NUM=$# # number of arguments
LEFT=${6} # old file
RIGHT=${7} # new file
L_TITLE=${3} # actual name and revision of old file
R_TITLE=${5} # actual name and revision of new file
L_TITLE=`echo $L_TITLE | tr -s ' ' | sed 's/ /\\\\ /g'`
R_TITLE=`echo $R_TITLE | tr -s ' ' | sed 's/ /\\\\ /g'`
$DIFF $LEFT $RIGHT -c "setl stl=$L_TITLE | wincmd W | setl stl=$R_TITLE"
Thursday, March 27, 2014
Bullet lists autoformatting for text files in vim
In
~/.vim/after/ftplugin create a file text.vim containing
" Vim filetype plugin file " Language: text " Maintainer: Alexander LobovThe main strings are" Last Change: 2014 Mar 27 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 setlocal autoindent setlocal formatoptions=tcroqln
setlocal autoindent setlocal formatoptions=tcroqlnYou .vimrc file should have
filetype plugin indent online.
Tuesday, October 22, 2013
ctag and csope for java
The same script as in this post, but for Java:
$ cat ~/bin/javatags
#!/bin/sh
workdir=`pwd`
workdir=${workdir/\/c/c:}
echo Work directory: $workdir
if [ ! -d cscope ]
then
echo Creating cscope directory
mkdir cscope
fi
echo Generating ctags
cd $workdir
ctags -R --language-force=java .
echo Generating cscope
cd /
find $workdir -name "*.java" > $workdir/cscope/cscope.files
cd $workdir/cscope
cscope -bq
echo Complete
Sunday, October 20, 2013
Use :tjump instead of :tag in vim
Often when you press CTRL-] in vim there are several options to jump on. By default CTRL-] is mapped to
:tag command, and you need to use :tselect after CTRL-] to see all alternatives. It is more convenient to see the list right away after pressing CTRL-]. vim already has such a command: :tjump. You just need to remap CTRL-] to :tjump instead of :tag:
nnoremap <c-]> g<c-]> vnoremap <c-]> g<c-]> nnoremap g<c-]> <c-]> vnoremap g<c-]> <c-]>Source.
Saturday, October 19, 2013
Not using of syntax highlighting
About a month ago I turned off syntax highlighting in vim.
And it turns out that syntax highlighting does not matter.
The code has not lost any readability.
Moreover, nothing distracts me and I can concentrate on the code, not on the highlighting.
So bravely remove or comment out the following lines from your .vimrc:
"if &t_Co > 2 || has("gui_running")
" syntax on
" set hlsearch
"endif
or just
syntax off set bg=darkIf you want your gvim looking like vim in a terminal, try xterm16 colorscheme.
if has("gui_running")
colo xterm16
endif
Subscribe to:
Posts (Atom)