Re: How do I make the current working directory follow the active document in Gvim?

2007-02-25 Thread Thor Andreassen
On Sun, Feb 25, 2007 at 06:50:41PM -0600, Bill McCarthy wrote:
 On Sun 25-Feb-07 6:22pm -0600, Noah Spurrier wrote:
  How do I configure Gvim so that the current directory
  follows the active document?
 
 Try this:
   autocmd BufReadPost * lcd %:h

You could also try :set autochdir, see :help 'autochdir'.

-- 
with kind regards
Thor Andreassen


Re: navigation using fchar or Fchar

2006-06-10 Thread Thor Andreassen
On Sat, Jun 10, 2006 at 10:51:24PM +0200, Marc Weber wrote:
[...]
 Can you  do 3f{ this way ?

Don't know if this is relevant, but you can do similar movements with ]}
and [{, which jump to enclosing } or { respectively.

-- 
with kind regards
Thor Andreassen


Re: comment out block for perl program

2006-06-07 Thread Thor Andreassen
On Wed, Jun 07, 2006 at 04:37:48PM +0800, Ken Perl wrote:
 how to comment out or uncomment out a block for perl program file?

There is of course the generic way with visual-block-mode, see

:help visual.txt

Basically it involves using C-v, highlight what you want to comment
and hit I#Esc. Highlight the # chars and use x to delete them when
uncommenting.

Other than that The NERD Commenter[1] looks pretty promising, haven't
used it much yet though.

[1] http://www.vim.org/scripts/script.php?script_id=1218 

-- 
with kind regards
Thor Andreassen


Re: sftp file browsing

2006-05-30 Thread Thor Andreassen
On Tue, May 30, 2006 at 11:19:11AM -0500, Jared wrote:
 Is it possible to browse a remote folder through FTP?  Eg, if I enter
 ':e .' it'll display the directory browser for the current directory.
 How can I do the same for remote directories?
 
[...]

 I'd like to be able to run something like 
 ':e sftp://sage/nessus_conf/' to get a directory listing.

This already works with newer versions of the netrw plugin. An upgrade
would probably solve this issue for you.

-- 
with kind regards
Thor Andreassen


Re: Text - commandline

2006-05-16 Thread Thor Andreassen
On Tue, May 16, 2006 at 07:12:01PM +0200, A.J.Mechelynck wrote:
 Meino Christian Cramer wrote:
  for what keyword I have to look in the online-help to find a hint
  how to copy any text from a buffer as any part of a command currently
  being edited in the commandline ?
 
 If by buffer you mean what the Vim docs call a register, see :help 
 c_CTRL-R.
 
 If you mean part of a file being edited, IMHO the easiest way is to yank 
 it beforehand into a register, though in some cases you can use the 
 expression register (Ctrl-R =) with e.g. expressions such as getline(.)
 
For shortcuts to inserting files and words on the commandline see the
section described here:

:help c_C-R_C-F

-- 
with kind regards
Thor Andreassen


Re: sourcing vimrc files

2006-05-15 Thread Thor Andreassen
On Sun, May 14, 2006 at 07:49:11PM -0500, Jared wrote:
 I'd like to map a hotkey to re-source my vimrc files (system + user).  I
 originally tried this simple approach:
 
 nmap buffer S-F9 :source $VIM\vimrcCR
   \ :source $VIM\_vimrcCR
   \ :source $HOME\_vimrcCR
 
 But that failed because source aborts when the file doesn't exist.

You could probably use :runtime instead of :source.

:help :runtime

[...]

-- 
with kind regards
Thor Andreassen


Re: Can't compile gui version with xorg

2006-04-17 Thread Thor Andreassen
On Mon, Apr 17, 2006 at 04:29:30PM +0100, Anthony Campbell wrote:
 On 17 Apr 2006, Thomas Adam wrote:
  
  --- Anthony Campbell [EMAIL PROTECTED] wrote:
  
   But vim compiles without the gui (gtk version). Any way to get it to do
   this?
  
  Well, can you tell us what's in config.log?  I suspect you're missing some 
  of
  the GTK header files, since a normal ./configure will attempt to build the
  X11/GUI component by default.
 
 configure:2673: checking for X
 configure:3532: checking if X11 header files can be found
 configure:3543: gcc -c -g -O2conftest.c 15
 configure:3537:22: error: X11/Xlib.h: No such file or directory

The following is very Debian specific.

When you know the exact filename of the file you are looking for,
apt-file(1) is your friend.

$ apt-get install apt-file
$ apt-file update
$ apt-file search X11/Xlib.h

On my system (Unstable) the result is:
  /usr/X11R6/include/X11/Xlib.h

Can you confirm that /usr/X11R6/include/X11/Xlib.h exists?

[...]

-- 
with kind regards
Thor Andreassen


Re: Can't compile gui version with xorg

2006-04-17 Thread Thor Andreassen
On Mon, Apr 17, 2006 at 06:01:23PM +0100, Anthony Campbell wrote:
 On 17 Apr 2006, Thor Andreassen wrote:
  On Mon, Apr 17, 2006 at 04:29:30PM +0100, Anthony Campbell wrote:
   On 17 Apr 2006, Thomas Adam wrote:

--- Anthony Campbell [EMAIL PROTECTED] wrote:

 But vim compiles without the gui (gtk version). Any way to get it to 
 do
 this?

Well, can you tell us what's in config.log?  I suspect you're missing 
some of
the GTK header files, since a normal ./configure will attempt to build 
the
X11/GUI component by default.
   
   configure:2673: checking for X
   configure:3532: checking if X11 header files can be found
   configure:3543: gcc -c -g -O2conftest.c 15
   configure:3537:22: error: X11/Xlib.h: No such file or directory
  
  The following is very Debian specific.
  
  When you know the exact filename of the file you are looking for,
  apt-file(1) is your friend.
  
  $ apt-get install apt-file
  $ apt-file update
  $ apt-file search X11/Xlib.h
  
  On my system (Unstable) the result is:
/usr/X11R6/include/X11/Xlib.h
  
  Can you confirm that /usr/X11R6/include/X11/Xlib.h exists?
  
  [...]
 
 It does not. It used to but I think it has been removed in the recent
 upgrade to xorg7.0. Have you done this upgrade in the last 2 o2 3 days?

No, I have not upgraded yet.

I am not sure, but this announcement might be related to your
problem:

http://lists.debian.org/debian-devel-announce/2006/04/msg00010.html

-- 
with kind regards
Thor Andreassen