Wednesday, July 13, 2011

Remotely editing files with ssh, sshmenu, bcvi and vim

No need to install your favourite vim settings etc on the remote server just use bcvi to start gvim on your workstation.
It uses scp internally to create an editing session from workstation to server

Transparent multi-hop ssh
sshmenu setup howto
Remotely editing files with bcvi and vim
Editing remote files in vim via scp

Browsing XSLT with Vim by adding a Custom Language to Ctags

XSLT Source Code Browsing with Vim and Ctags

Creating a tags file

1) Test out the regular-expressions for your custom language:
$> egrep 'pattern' *.xsl
2) Copy-paste custom language with the above regular-expressions into ~/.ctags.
$> vi ~/.ctags
--langdef=EXSLT
--langmap=EXSLT:.xsl
--regex-EXSLT=/--regex-EXSLT=/--regex-EXSLT=/$> cd srcdir
$> ctags -R *
$> vi ./tags        #check for tag-entries containing the search patterns
$> vi test.xsl     #Use Ctrl-] to jump from a pattern usage to its definition, Ctrl-T to jump back
Note:
1) Above solution for templates only uses xpath of match="xyz".
The search-key for the template (displays taglist for templates with same xpath).
Potentially a template is uniquely identifiable using match AND mode: