Vim Tips Wiki
Register
No edit summary
Tag: Source edit
 
(16 intermediate revisions by 11 users not shown)
Line 3: Line 3:
 
|previous=1578
 
|previous=1578
 
|next=1580
 
|next=1580
|created=February 16, 2008
+
|created=2008
 
|complexity=basic
 
|complexity=basic
 
|author=Metacosm
 
|author=Metacosm
Line 11: Line 11:
 
|category2=
 
|category2=
 
}}
 
}}
  +
Searching the tips on this wiki can often help solve a problem encountered when using Vim. However, if you want to ask a question, you will need to subscribe to a [[Vim Tips Wiki:Community Portal|mailing list]], or join the '''#vim''' IRC channel.
If you can't find an answer to your problem on the Vim Wiki – try the #Vim IRC channel on http://freenode.net.
 
   
  +
==IRC overview==
To help centralize the vim.wikia.com site as the place to go for Vim Wiki support, [[User:Metacosm|Metacosm]] has moved the best articles from http://vi-improved.org to this wiki.
 
  +
IRC ([[Wikipedia:Internet Relay Chat|Internet Relay Chat]]) is a form of real-time text messaging (chat). A user installs a suitable [[Wikipedia:Comparison of Internet Relay Chat clients|IRC client]] program, then configures it to connect to an IRC network (such as [[Wikipedia:Libera Chat|Libera Chat]]), and a specific channel on that server (such as #vim).
   
==General==
+
==Joining #vim==
  +
To join the #vim IRC channel you need to use an IRC client to connect to the Libera Chat IRC network. HexChat, Konversation, XChat, mIrc, Miranda, Textual and Pidgin are graphical clients that can be used to connect to an IRC network. WeeChat and Irssi are popular [https://libera.chat/guides/clients terminal clients]. On Firefox you can also use the ChatZilla addon. On Android, RevolutionIRC is a popular client available from F-Droid and Google Play. On Apple iOS, LimeChat is available from the AppStore You can also use [https://web.libera.chat/ Libera.Chat] so you don't have to install any software.
*[[New to Vim|New to Vim?]]
 
*[[Example_vimrc|Example <tt>.vimrc</tt>]]
 
*[[Vim_scripts#Best_plugins|Best plugins]]
 
*[[Quick tips]]
 
*[[Vim IRC FAQ]]
 
*[[Tutorial]] (reference version of http://vi-improved.org/tutorial.php)
 
*[[Super retab]]
 
   
  +
Choose an IRC server from the list of [https://libera.chat/guides/connect libera.chat hostnames] near you to connect to. Your client of choice will probably have a list of them configured already. Once connected you can use the <code>/join #vim</code> command to join the #vim channel (makes sense doesn't it). In the webchat you can also enter the room you want to join right away.
==Answered questions==
 
*Vim is confusing, where do I start? [[New to Vim]], [[Tutorial]], [http://vi-improved.com/tutorial.php Vi-Improved.org Tutorial]
 
*How do I record a macro? [[Macros]]
 
*How do I edit GPG encrypted files in Vim? [[Edit gpg encrypted files]]
 
*How do I reselect the visual range I just used? [[Visual selection]]
 
*How do I change the GUI Font (and make those changes stick)? [[Change font]]
 
*How do I make backspace work like in other editors? [[Backspace and delete problems]]
 
*How do I fix syntax highlighting problems? [[Fix syntax highlighting]]
 
*How do I paste in code without having all the indenting screwed up? [[Toggle auto-indenting for code paste]]
 
*How do I insert the current date/time into my file? [[Insert current date or time]]
 
*How do I make the options I set STAY set? [[Debug unexpected option settings]]
 
*How can you read/write system environment variables from within Vim? [[Environment variables]]
 
*How can I dump my file to html looking EXACTLY as it currently does (syntax highlighting at all)? [[Pasting code with syntax coloring in emails]]
 
*How to tell Vim to save as a new file when the file is hardlinked? [[Editing a hard link to a file]]
 
*How can I fix the line-endings in this file? [[File format]]
 
*How to exchange the current line with the line above/below? [[Swapping characters, words and lines]]
 
*How can Vim work with Visual Studio .Net? [[Integrate gvim with Visual Studio]]
 
*How can I get diff to work properly in the MS Windows port of Vim? [[Fix error E97 Cannot create diffs under Windows|Cannot create diffs under Windows]]
 
*How can I get Visual Studio like completion (i.e. Intellisense) in Vim? [[Omni completion]]
 
*How can I delete parens that surround text? See ''Surround'' at [[Vim_scripts#Best_plugins|Best plugins]]
 
*Why do letters show up when I try to enter numbers from the keypad? Why doesn't the numpad work as expected? Why does the NumLock key bring up help.txt? [[PuTTY numeric keypad mappings]]
 
   
  +
On the libera.chat IRC network you need to register your account (aka nick) to be able to chat in most channels. A [https://libera.chat/guides/registration detailed howto] is available on the Libera.Chat site. It only takes a few minutes to register so it's not that big a hassle. If you're using client software there's usually a way to have the registration done automatically once you log on. Google is your friend if you want to find out how to do that for your particular client.
==Unanswered questions==
 
*How can I remap the escape key to toggle insert mode? By default, INSERT starts insert mode, and ESCAPE takes you back into normal mode. How can I map ESCAPE to do both, toggling insert mode? -- Anonymous 21:37, 6 August 2009 (UTC)
 
   
  +
More detailed information on all of this is available on the [https://libera.chat/guides libera.chat website].
*How can I make keywords autocompletable when creating a new C source file?
 
   
  +
{{todo}}
::Make sure Vim knows it is a C file: e.g., open it with '''<tt>:e main.c</tt>''', not just '''<tt>:enew</tt>'''. — [[User:Tonymec|Tonymec]] 16:17, 4 August 2009 (UTC)
 
  +
*Outline how to ask a question.
   
  +
==See also==
*How can I redirect stderr output in Windows ? I have a problem setting <tt>'makeprg'</tt> with a compiler whose error messages can't be caught with '>'.
 
  +
[http://vi-improved.org Vi-IMproved.org] is the online home for #vim. It is maintained by robertmeta (aka [[User:Metacosm|Metacosm]]) who moved the general "information on Vim" pages to the Vim Tips wiki in [[Vim Tips Wiki:New tips/200802|February 2008]].
::I believe this question is now obsolete. The default value of 'shellpipe' on Windows seems to be ">%s 2>&1" which will (with the "2>&1") redirect stderr output from :make. The help does not reflect this default value, however. It looks like the support was added back in 6.1.105 but never made it into {{help|'shellpipe'}}. --[[User:Fritzophrenic|Fritzophrenic]] 16:07, 23 March 2009 (UTC)
 
   
  +
Some useful pages:
:::{{help|'shellpipe'}} talks of "Amiga and MS-Dos" OT1H, of *sh shells OTOH, but doesn't mention W32 (as distinct from MS-Dos). Maybe it should. — [[User:Tonymec|Tonymec]] 16:17, 4 August 2009 (UTC)
 
 
*[[New to Vim|New to Vim?]]
 
 
*[[Example_vimrc|Example <code>.vimrc</code>]]
*For encrypted files, {{help|encryption}} states: "Text you copy or delete goes to the numbered registers. The registers can be saved in the .viminfo file, where they could be read. Change your 'viminfo' option to be safe." Wouldn't it be a lot better if Vim by default would not write all your sensitive information to the viminfo file?
 
 
*[[Vim_scripts#Best_plugins|Best plugins]]
 
 
*[[Quick tips]]
::The registers are a useful place to keep <u>permanent</u> (or semi-volatile) information which will be saved in the viminfo file at closedown and restored at the next startup. I think the <tt>'viminfo'</tt> default is sensible; it's only when editing encrypted files that registers can be viewed as containing "sensitive information". If all your files are encrypted (which I don't think should be the Vim default) you can change the <tt>'viminfo'</tt> option in the vimrc. Or you can define a user-command, let's say <tt>:XX</tt>, which will both prompt the user for an encryption key and change the <tt>'viminfo'</tt> option — maybe even set it to the empty string. — [[User:Tonymec|Tonymec]] 16:17, 4 August 2009 (UTC)
 
 
*[[Vim IRC FAQ]]
 
  +
*[[Tutorial]]
==Other sources==
 
 
*[[Super retab]]
*http://vimdoc.sourceforge.net/vimfaq.html
 
   
 
==Comments==
 
==Comments==
'''Proposal to remove "questions"''' We get distracted by people looking for help – the wiki is the wrong place, and we have to take time politely explaining to each new person why we are going to rudely delete their question (we refer questioners to the [[Vim Tips Wiki:Community Portal|Community Portal]]). The two "questions" sections above could easily make readers think that we are inviting questions, but in fact we do not have sufficient contributors to handle them (and a wiki is not the right place). Is there some compelling reason to keep the two sections as they are?
 
 
I propose making just one section ("Common issues"?) with the answered questions, then merge in some of the "unanswered" points (with whatever answers we can quickly find, based on the replies above). Then, I would delete anything for which we currently do not have a satisfactory answer (I would rephrase the new question about mapping the escape key and give a link to [[Esc]]). In the future, only add material that has at least a partially satisfactory resolution. Any thoughts? [[User:JohnBeckett|JohnBeckett]] 10:42, 7 August 2009 (UTC)
 
:Please do. Please remove the '''Answered Questions''' sections to relevant tip or FAQ pages also, if you can find any. We seldom if ever refer anyone to this page for answers, and they are quite haphazard and random. I've been meaning to rebuild this page, as well as the '''Best Scripts''' section &mdash; they are quite outdated. ([[User:Spiiph|Spiiph]] 11:22, 7 August 2009 (UTC))
 
::While I'm happy to respect Metacosm's original thought to have these issues listed here, perhaps it would be more helpful to move them to [[Vim IRC FAQ]]. If no objection, I think I'll do that soon: move the question stuff from here to the IRC FAQ and start a minor refactor of that FAQ. Later, add more info on this page about just what IRC is, and how one might join #vim, and how one might ask a question there (at the moment this page doesn't really convey any information; if you already know what "#vim" means, it's obvious, and if you don't, the info does not help). Probably mention some IRC client software, or perhaps just a link to some Wikipedia article would do? [[User:JohnBeckett|JohnBeckett]] 11:59, 7 August 2009 (UTC)
 

Latest revision as of 05:03, 11 June 2021

Tip 1579 Printable Monobook Previous Next

created 2008 · complexity basic · author Metacosm · version 7.0


Searching the tips on this wiki can often help solve a problem encountered when using Vim. However, if you want to ask a question, you will need to subscribe to a mailing list, or join the #vim IRC channel.

IRC overview[]

IRC (Internet Relay Chat) is a form of real-time text messaging (chat). A user installs a suitable IRC client program, then configures it to connect to an IRC network (such as Libera Chat), and a specific channel on that server (such as #vim).

Joining #vim[]

To join the #vim IRC channel you need to use an IRC client to connect to the Libera Chat IRC network. HexChat, Konversation, XChat, mIrc, Miranda, Textual and Pidgin are graphical clients that can be used to connect to an IRC network. WeeChat and Irssi are popular terminal clients. On Firefox you can also use the ChatZilla addon. On Android, RevolutionIRC is a popular client available from F-Droid and Google Play. On Apple iOS, LimeChat is available from the AppStore You can also use Libera.Chat so you don't have to install any software.

Choose an IRC server from the list of libera.chat hostnames near you to connect to. Your client of choice will probably have a list of them configured already. Once connected you can use the /join #vim command to join the #vim channel (makes sense doesn't it). In the webchat you can also enter the room you want to join right away.

On the libera.chat IRC network you need to register your account (aka nick) to be able to chat in most channels. A detailed howto is available on the Libera.Chat site. It only takes a few minutes to register so it's not that big a hassle. If you're using client software there's usually a way to have the registration done automatically once you log on. Google is your friend if you want to find out how to do that for your particular client.

More detailed information on all of this is available on the libera.chat website.

 TO DO 

  • Outline how to ask a question.

See also[]

Vi-IMproved.org is the online home for #vim. It is maintained by robertmeta (aka Metacosm) who moved the general "information on Vim" pages to the Vim Tips wiki in February 2008.

Some useful pages:

Comments[]