History of Vim Tricks

Differences from version 13 to 23

@@ -1,9 +1,20 @@

+!vimrc tips
+* if you put these 2 lines in your vimrc, you can use :make to check your php code for typos: {code source="text"}set makeprg=php\ -l\ %
+set errorformat=%m\ in\ %f\ on\ line\ %l{/code}
 ^vim + cscope is insanely cool.^
+{attachment id=884 desc="This shell script" output=desc} will set up your machine with the stuff described below. all you need to do is download it, set the file executable and run it.
+{code source=Bash}
+curl http://www.bitweaver.org/liberty/download/file/884 -o vim-cscope
+chmod +x vim-cscope
-!What's cscope?
+!!What's cscope?
 cscope will generate a list of functions used in bitweaver and you can use a few keymaps to very quickly jump to those functions from within bitweaver (or any source code tree). cscope is faster and more feature rich than ctags.
-! Setting it up
+!! Setting it up
 # Install cscope (via rpm, etc)
 # Add this file to __/usr/local/bin/cscope-php__ {code source="bash" title="/usr/local/bin/cscope-php"}#!/bin/bash
 for arg in "$@"; do

@@ -19,8 +30,8 @@

 # Have a periodic crontab like:{code source="bash" title="cronjob"}0 * * * * /usr/local/bin/cscope-php /path/to/project1 /other/path/to/project2{/code}
-# mkdir -p ~/.vim/plugin/ && curl -o ~/.vim/plugin/cscope_maps.vim http://cscope.sourceforge.net/cscope_maps.vim
-# Add the following to your ~/.vimrc (or /etc/vimrc for cool people) {code source="vim" title="~/.vimrc or /etc/vimrc"}" Some scsope specific settings
+# {code source=bash title="get vim plugin"}mkdir -p ~/.vim/plugin/ && curl http://cscope.sourceforge.net/cscope_maps.vim | sed 's/\bcs add\b/" cs add/' > ~/.vim/plugin/cscope_maps.vim{/code}
+# Add the following to your ~/.vimrc (or /etc/vimrc for cool people) {code source="vim" title="~/.vimrc or /etc/vimrc"}" Some cscope specific settings
 if has("cscope")
  " Some scsope specific settings
  set cscopequickfix=s-,c-,d-,i-,t-,e-

@@ -77,7 +88,7 @@

  <CTRL-\>s will show all places where the function has been used
  use ':copen' to view the complete list.{/code}
-! Using it all
+!! Using it all
 Some funky tips on how to use your new setup (taken from cscope_maps.vim):
 {code source=text title="Mapping Overview"}
 The following maps all invoke one of the following cscope search types:

@@ -112,4 +123,3 @@

 # navigate to the occurrance you're interested in and hit <enter>
 # <CTRL-O> (move backward in your jump history - might need to hit this more than once to return to edit/wiki.php)
 # <CTRL-I> (move forward in your jump history)
Page History
25 Jul 2008 (18:26 UTC)
Current • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source
View • Compare • Difference • Source