how to get gvim to open a file over ssh?

2007-05-04 Thread ben lieb
In ubuntu linux:

I have a remote (ssh) connection through nautilus (gui file manager).
When I right-click a file, I can open, edit and save the file in text
editor without any problem. When I open the file in gvim, it is empty.

What can I do to solve this?

Thanks for any help


open remote file in vim/gvim

2007-04-23 Thread ben lieb
This might have been discussed before, but how can I open a file
remotely in vim?

Via, ftp, ssh, etc.



my map only works sometimes

2007-04-04 Thread ben lieb
The following map is used to do add span tags to highlighted text
in-line. My problem is that it only works sometimes, and I don't know why.

:map ,bb cCRCRESCkpIspanESCA/spanESCkJJ

The map works by cutting the highlighted text, putting it on its own
line, adding the tag to the front and the end of the line, and then
joining the lines.

Any thoughts on why this only works sometimes? I can't isolate what
conditions bring it about.


Re: my map only works sometimes

2007-04-04 Thread ben lieb
Yakov Lerner wrote:
 On 4/4/07, ben lieb [EMAIL PROTECTED] wrote:
 The following map is used to do add span tags to highlighted text
 in-line. My problem is that it only works sometimes, and I don't know
 why.

 :map ,bb cCRCRESCkpIspanESCA/spanESCkJJ

 The map works by cutting the highlighted text, putting it on its own
 line, adding the tag to the front and the end of the line, and then
 joining the lines.

 Any thoughts on why this only works sometimes? I can't isolate what
 conditions bring it about.

 Can be several things.

 1. To cancel possible influence of keyboard timeouts, map
 the same rhs to the single-key combination -- like F10.
 When ,bb dopesn't work, try f10. If f10 works, it's related to
 timeouts.

 2. Change to vnoremap instead of map. This cancels possibble
 effects or remapping of some chars in the rhs. I think you want to use
 it in the visual mode, right ? Then use vnoremap.

 3. When it doesn';t work, what exactly happens ? Is it totally ignored,
 or works half-way ?

 4. When it doesn't work, do ':map ,bb' to check whether it's still
 defined and is rhs correct.

 Yakov



When it doesn't work it, it re-highlights the first half of the
sentence, and then does nothing.

The reason I 'enter' twice, and then join the lines twice, is to be able
to get the text I want surrounded on a line by itself, then at the tags
the the front and back, and then join the lines together again.

The map is in my vimrc file. An odd thing is that when it doesn't work,
I can re-enter it on the command line, and then it will work.


How can I pass the full path of the current buffer to a command line script?

2007-03-30 Thread ben lieb
I want to send the full path of the current buffer to a command line
script like this:

:!command thisFile

What symbol do I use to represent thisFile, meaning the current buffer?

This seems like an easy one, but I can't figure it out.


Pasting into gvim from word: ' tu rns into ¿

2007-02-09 Thread ben lieb
I asked this question before, but it wasn't really resolved. I often
have to paste from Word for Windows into vim/gvim (cygwin).

Some characters don't transfer properly. Most annoyingly is that a
single quote ( ' ) turns into this: ¿

Is there an easy way around this?


setting font and color scheme in gvim (cygwin)

2007-02-07 Thread ben lieb
I've started using gvim through cygwin on windows and I'm having to set
the color scheme and font every time I open it. Is there a way to set
this in an rc file or somewhere?

I put the following in my .vimrc file, but it seems to have had no
effect on the default setting.

set guifont=Terminal:10

I don't know the commands to set color schemes.

Any help appreciated,

Ben
 


Re: open multiple files with wildcard from inside vim

2007-02-05 Thread ben lieb
Cameron Simpson wrote:
 On 05Feb2007 01:44, ben lieb [EMAIL PROTECTED] wrote:
 |  Have you tried:
 |:n path/file*
 [...]
 | That's better than where I was, thanks. Ideally the files would all be
 | visible, either split on the screen, or in separate tabs. Is there a
 | way to do this?

 You're now into vim areas of which I know little. I only migrated to
 vim from nvi recently, and that basicly for the syntax highlighting and
 file completion for :n commands; nvi has file completion - better than
 vim's in some ways, and worse in others. I find split displays annoying
 and confusing, and generally just keep multiple editor windows around
 where you would probably use tabs. A split display leaves me feeling
 I'm sacrificing text display space to a file I'm not editing:-(

 However, if you have a large number of files: how well will they display
 in split mode or tabs? My first thought is not awfully well.

 My usual editing mode has only one file displayed at once per window.
 Combined with autowrite and # mapped to :n #^M it's quite effective
 for me.
   
It seems that everyone has such specialized needs sometimes. I'm a web
develper and have at least 10 programs going at one time. More windows
is not an option. Multiple tabs would be ideal, but once you get used to
working with a split screen (horiz, or vert), you find that it has its
uses. Usually when you have a long file or want to make a quick edit.

Anyone else?


open multiple files with wildcard from inside vim

2007-02-04 Thread ben lieb
I thought I read once that I could open multiple files with a wildcard
from within VIM (not from the command line).

I tried this:

:sp path/file*

And vim gives me too many file names, even though there are only two
files that match.

Any help appreciated.


How to filter only portion of a line, and not the whole line?

2007-01-27 Thread ben lieb
Greetings Vim Users! This is my first post, so Hello all from North
Carolina!

I have decided to write some perl filters for vim, but was disappointed
that it seems I can only filter WHOLE LINES (and not selected parts of
lines). Is this true?

I found that...
 
:','!my_filter.pl

...is given the whole line, even when only two words in the middle of
the line are selected. Is there any way to send only parts of lines and
not the whole line(s).

Thanks in advance for any and all help, and since this is my first post,
I want to say a big THANK YOU to all those in the vim dev community for
maintaining such a powerful tool!