LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-20-2009, 08:45 PM   #1
jcky
Member
 
Registered: Feb 2008
Location: China-Shanghai
Distribution: Rhel&Suse
Posts: 82

Rep: Reputation: 15
Visual mode of VIM


In visual mode, when you used the 'ctrl + v' function, you could use 'gq' shortcut key to format the current line to 'textwidth' columns.
I want to know how to find the parameters 'textwidth' and how to modify it?
Thanks!
 
Old 11-21-2009, 03:21 PM   #2
bartonski
Member
 
Registered: Jul 2006
Location: Louisville, KY
Distribution: Fedora 12, Slackware, Debian, Ubuntu Karmic, FreeBSD 7.1
Posts: 443
Blog Entries: 1

Rep: Reputation: 48
Quote:
Originally Posted by jcky View Post
In visual mode, when you used the 'ctrl + v' function, you could use 'gq' shortcut key to format the current line to 'textwidth' columns.
I want to know how to find the parameters 'textwidth' and how to modify it?
Thanks!
Code:
:set tw
Will show you current textwidth. The default is 0, which disables textwidth and all associated features.

Code:
:set tw=80
Sets textwidth to 80. Obviouslly, this doesn't have to be 80.

I'm just going by what the help pages for gvim told me, I haven't actually tried this.
 
Old 01-03-2010, 04:18 AM   #3
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,035

Rep: Reputation: 65
Quote:
Originally Posted by jcky View Post
In visual mode, when you used the 'ctrl + v' function, you could use 'gq' shortcut key to format the current line to 'textwidth' columns.
I want to know how to find the parameters 'textwidth' and how to modify it?
Thanks!
Mark the thread as [SOLVED].It's under the "Thread Tools" above.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: A visual walk through of a couple of the new features in Vim 7.0 LXer Syndicated Linux News 0 09-21-2006 09:54 AM
VIM insert before a visual block... pld Linux - Software 0 06-22-2005 11:36 AM
Using Visual in VIM editor manikantha Linux - General 4 06-10-2005 08:55 AM
Possible problem with VISUAL=vi (vim & bash) redthor Linux - Newbie 2 04-26-2005 06:19 AM
vim: coding mode and doc writing mode? miknight Linux - Software 2 03-07-2004 08:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:25 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