Archive for the ‘vim’ Category

Ubuntu’s vim and vim-latexsuite

Thursday, June 5th, 2008

Since the default gvim-application-menu-entry in Ubuntu starts gVim via “gvim -f” it is not able to execute a couple of vim-latexsuite commands properly, for example |lv and |ls just don’t work. Changing the menu-entry fixes this issue (also for starting via gnome-do).

vim-latexsuite rocks (after some configuration)

Monday, June 2nd, 2008

I am using vim-latexsuite under Ubuntu Hardy Heron and it rocks - absolutely - after some bugfixing and configuration. Had to spent some time in the sources and in a couple of mailinglist till I got it running. After all it was simple, but it took some time to find out the magic words strings.

First of all, in 20060325-4.1 the Ubuntu-version has got a bug (LP: #225411) - it just won’t work out of the box. You’ve got to either set some symlinks manually or apply the patch - I applied the patch.

$ sudo patch /usr/share/vim/registry/vim-latexsuite.yaml < vim-latexsuite.patch

Now you can activate the addon for your users vim via $ vim-addons install latex-suite. Vim-latexsuite should work from now on. If you want spellchecking, get your languages dictionary by :setlocal spelllang=<langkey&gt; (in my case de) - vim will ask you if it should download the needed files. Afterwards set spelllang to whichever languages you want, I choose spelllang=en,de_20 (looked it up in the vim-help, which is excellent). You might want to put that in your .vimrc as an autocommand for some filetypes - may be for tex-files.

Now I wanted just two more things:

  1. forward searching
  2. reverse searching

You can actually have quite some work to enable this functionalities, but you do not have to. It is all done by setting two (2) global environment variables in vim (it only works properly in gvim this way, but since you have to use xdvi to display the dvis that should not be a problem).

let g:Tex_CompileRule_dvi=’latex -src-specials -interaction=nonstopmode $*’
let g:Tex_UseEditorSettingInDVIViewer=1

These two in your .vimrc should do the job, no manual server setting, etc. I had to read a bit of vim-latexsuite source to find out.

If this should not work for you (may be, because you’ve already messed up your system in some way) here a bunch of links that gave me the direction:

Remote editing with (g)vim

Saturday, February 16th, 2008

Logging onto an remote server and editing a file via vi(m) requires three things (to do it securely):

  1. (Open)SSH: the tool of choice for (almost) every network-operation.
  2. (g)VIM: the ugly monster editor of choice to those that have seen the light.
  3. a fast enough, not otherwise used, stable network-connection to be able to work fluently and not loose your changes.

If you do not want to depend on number 3 (for example get disturbed by an improperly configured backup-operation or someone else putting heavy load onto the server or by faulty connections), do it this way:

Open your files using the (amazingly extended) netrw plugin VIM brings along since version 6. Just open your files via :e scp://<username>@<servername>//<dir>/<file>. Or even shorter (if ssh is configured correctly) via gvim scp://<servershortcut>/<somedir>/ - if your scp-command ends with a slash, VIM will give you the :E-exploring-mode on the remote server. I’m loving it!

PS: And I also love it, that I do not have to install vim at every remote computer I want to edit files at and that I am able to edit files on headless servers with the g-version of vim.

vimdiff plugin for Bazaar (nice!)

Saturday, January 26th, 2008

Bazaar is generally the way to go if it comes to the question of version control systems - at least if you ask me for the direction to go ;).
This thing makes the already rocking bazaar-vcs rock even more. Software as it should (always) be, just bzr the current version into your bzr plugin directory (I love the bzr-plugin concept).