LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Vim problems (https://www.linuxquestions.org/questions/linux-general-1/vim-problems-45812/)

Cyth 02-17-2003 10:53 AM

Vim problems
 
Hi all,

I have some trouble with vim; perhaps you can enlight me.

1)
Most of the time I find myself entering/exiting insert mode only to insert a silly space or a newline. Is there some elegant way to do this?

2)
I don't get the difference between :n/:N and :bn/:bp(and so on. which one should I stick too? Is :n about files while :b is about buffers? Why not use :b all the time?

3)
I use vim partially for writing documents. I have 'set lbr' to enable "wordwrap" but when I navigate I jump several lines since 'j' and 'k' jump between the 'enter'-character. The behavior is correct but I want j/k to move between the actual visible lines no matter if there's a backet or not. Feasible?

4)
Footnotes, is it possible, via some extension perhaps?

5)
So silly, but I can't find it in the help; what command behaves just as :bad but opens the new buffer?

6)
I've noticed that ALT-j ie. exits insert mode and does one 'j'-event. This is quite practical since you don't have to reach for the escape button. But what is the general use of the ALT button? I can't find the pattern..
Same with CTRL. What's its use?


Any ideas, suggestions at all are highly appreciated.

Cheers!
Cyth

wapcaplet 02-17-2003 02:20 PM

I am by no means a Vim expert, but I do know:

1. You can use 'o' or 'O' to insert newlines before or after the cursor location, respectively. (though, this does place you in insert mode, so if that's not what you wanted, then I'm not too sure)

2. :new versus :buffer... beats me :) On mine, it looks like :new creates a new window (splitting the current one), whereas :buffer does not, but I have never messed around with buffers so I am not sure.

I can't really help you with the rest, though. Vim is always surprising me with how much it can do! I found a book online about Vim recently:

http://www.newriders.com/books/opl/e...735710015.html

Maybe that will help?

cuckoopint 02-17-2003 03:08 PM

1)
newline: 'o' or 'O'
move line/text: [count]>> or [count]<<
or in visual mode:
V>; v>; v<; V;

2)
if editing multiple buffers, I believe :b will discad chnages while :n won't. <this should be verfied by someone>

4) no can do. (if I'm wrong, tell me). vim is a text editor. If one starts creating footnotes, it will become a wordprocessor with tags. (think about it, the editor would need to know this is a footnote, ie. <footnote> lalala </footnote>. at this point it stops being a very flexible text editor. see my sig


All times are GMT -5. The time now is 07:42 AM.