LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-17-2003, 10:53 AM   #1
Cyth
Member
 
Registered: Mar 2001
Location: Sweden, Lund
Distribution: Slackware
Posts: 68

Rep: Reputation: 15
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
 
Old 02-17-2003, 02:20 PM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
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?
 
Old 02-17-2003, 03:08 PM   #3
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
encryption with Vim (vim -x) mikshaw Linux - Software 2 03-07-2007 09:00 AM
vim syntax highlighting problems. donniejones18 Linux - Software 7 04-16-2006 08:03 PM
Problems with vi / vim in Fedora core 2 shinobi59 Linux - General 1 06-16-2005 09:50 AM
VIM Config problems djgerbavore Slackware 5 05-05-2005 09:18 AM
Is there a way in vim to do this ?? purpleburple Linux - Software 6 11-09-2002 11:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration