Wikia

Vim Tips Wiki

Menu for inserting special characters

Talk0
1,610pages on
this wiki
Revision as of 00:53, April 25, 2008 by JohnBot (Talk | contribs)

Tip 236 Printable Monobook Previous Next

created April 19, 2002 · complexity basic · author Th. Ramming · version 5.7


Here are some examples of easily inserting special characters, using gvim's menu.

Add the following lines in your vimrc and you can select them via menu (change the names of the menu if you don't have German installed or don't like my titles).

I also made some abbreviations to get separation lines in documentation or code files,

abb dotlin ……………………………………………………………………………………………………………………………………………………………………………………………^M
abb cdotlin /*…………………………………………………………………………………………………………………………………………………………………………………*/^M
abb fdotlin •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••^M
abb cfdotlin /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/^M
abb dlin =======================================================================^M
abb cdlin /*===================================================================*/^M
abb lin -----------------------------------------------------------------------^M
abb clin /*-------------------------------------------------------------------*/^M
abb ulin _______________________________________________________________________^M
abb culin /*___________________________________________________________________*/^M
abb Ulin ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯^M
abb cUlin /*¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯*/^M

You have to substitute ^M with CTRL_V CTRL_M or delete it.

20imenu Editieren.Sonderzeichen.open\ angle\ « <C-R>=nr2char(171)<CR>
20nmenu Editieren.Sonderzeichen.open\ angle\ « a<C-R>=nr2char(171)<CR><ESC>
20imenu Editieren.Sonderzeichen.close\ angle\ » <C-R>=nr2char(187)<CR>
20nmenu Editieren.Sonderzeichen.close\ angle\ » a<C-R>=nr2char(187)<CR><ESC>
20imenu Editieren.Sonderzeichen.start\ mark\ „ <C-R>=nr2char(132)<CR>
20nmenu Editieren.Sonderzeichen.start\ mark\ „ a<C-R>=nr2char(132)<CR><ESC>
20imenu Editieren.Sonderzeichen.end\ mark\ \ ” <C-R>=nr2char(148)<CR>
20nmenu Editieren.Sonderzeichen.end\ mark\ \ ” a<C-R>=nr2char(148)<CR><ESC>
20imenu Editieren.Sonderzeichen.fat\ dot\ \ • <C-R>=nr2char(149)<CR>
20nmenu Editieren.Sonderzeichen.fat\ dot\ \ • a<C-R>=nr2char(149)<CR><ESC>
20imenu Editieren.Sonderzeichen.etc\ \ \ … <C-R>=nr2char(133)<CR>
20nmenu Editieren.Sonderzeichen.etc\ \ \ … a<C-R>=nr2char(133)<CR><ESC>
20imenu Editieren.Sonderzeichen.!underscore\ \ ¯ <C-R>=nr2char(175)<CR>
20nmenu Editieren.Sonderzeichen.!underscore\ \ ¯ a<C-R>=nr2char(175)<CR><ESC>
20imenu Editieren.Sonderzeichen.copyright\ \ © <C-R>=nr2char(169)<CR>
20nmenu Editieren.Sonderzeichen.copyright\ \ © a<C-R>=nr2char(169)<CR><ESC>
20imenu Editieren.Sonderzeichen.paragraph\ \ § <C-R>=nr2char(167)<CR>
20nmenu Editieren.Sonderzeichen.paragraph\ \ § a<C-R>=nr2char(167)<CR><ESC>
20imenu Editieren.Sonderzeichen.noitamalcxe\ ¡ <C-R>=nr2char(161)<CR>
20nmenu Editieren.Sonderzeichen.noitamalcxe\ ¡ a<C-R>=nr2char(161)<CR><ESC>

Comments

You can insert lines (if you know the length) e.g. by typing '40'<select special char from menu> in normal mode.


Advertisement | Your ad here

Around Wikia's network

Random Wiki