Multi-byte in the special key
Hi! It's my first mail to this list. I'm using vim on Win32 this Russian keyboard. There are some bugs with mapping of russians special keys. I've made some patches to fix these bugs. Let start step by step. 1. Special key may contain multi-byte character (ex. unicode) after modifier. For example, if I press a key Alt-k with russian input (Alt-л) then vim's got key K_SPECIAL K_SPECIAL 0x08 0xd0 0xbb, where 0xd0 0xbb is the unicode character CYRILLIC_SMALL_LETTER_EL. 2. In functions find_special_key (misc2.c) and str2special (message.c) vim supposes that there is only _1_ byte after modifiers. I can offer the corrected code for these functions. (There are 2 other patches to fix this problem in the console Win32 application)
Deutscher Vim-Tutor 1.7 kurz vor der Freigabe
Hallo Freunde von vim oder die, die es werden wollen, der deutsche vimtutor wurde stark erweitert und somit an das englische Original angepaßt. Die Version ist 1.7. Für jeden entdeckten Fehler gibt es einen Punkt. Man kann sich den tutor einfach ansehen unter: http://freenet-homepage.de/schuttvim/tutor.de oder praktisch in Echtbedingung durcharbeiten (zum erlernen von vim empfehlenswert!): -) Kopiere die Datei tutor.de in das Vim-Runtime-Tutor-Verzeichnis (also z.B vim62\tutor\ oder vim70\tutor\, ältere tutor.de überschreiben) -) Starte die ausführbare Datei vimtutor im Runtime-Verzeichis (z.B. für Windows: vim70\vimtutor.bat) -) Durcharbeiten und viel Lernen, fertig. Gruß Joachim ### This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.f-secure.com/
Support of Lisaac
Hi, Is someone working on getting lisaac supported in vim ? http://isaacos.loria.fr/li.html If not, I would be happy to do it. So if someone can give me a link where I can find a documentation about how to do this .. Thanks ! friendly, -- ,''`. Xavier Oswald [EMAIL PROTECTED] : :' : GNU/LINUX Debian Debian-Edu `. `' GnuPG Key ID 0x88BBB51E `-938D D715 6915 8860 9679 4A0C A430 C6AA 88BB B51E
Re: Wish, Kate like file list.
On 4/12/07, Ingo Karkat [EMAIL PROTECTED] wrote: Edd Barrett wrote: Hi, This might already be possible, please excuse me if it is. I love the editting features of vim, but find that navigating between open files is quite difficult. Ideally I think I would be quite confortable with a kate like interface for listing open files: http://www.kde.org/screenshots/images/3.1/fullsize/2.png (screenshot) I got quite close by messing about with netrw in a vertical split, but the list pane did not: - Remain the same size - Show only one file to be open in the right hand pane. It would always split again for each newly selected file. Does anyone know how to do this? Would anyone find this useful? I have looked into using vim-part inside kate, but this is not supported for my UNIX distribution. I haven't used Kate, but I'm using a combination of - project (http://vim.sourceforge.net/scripts/script.php?script_id=69) to (re-)open files belonging to a custom file structure, - ProjectBrowse (http://vim.sourceforge.net/scripts/script.php?script_id=943) to open files in subdirectories and - most useful - - bufexplorer (http://vim.sourceforge.net/scripts/script.php?script_id=42) to navigate between files currently open in buffers. I've set up those plugins to open in a vertical split at the left side (like in most IDEs). Each view can be toggled on/off via a function key (F2, F3, F4). If one view is already open, trying to open another one will close the former, so that they don't eat up all of my window space. I was hoping the SideBar.vim plugin would do this for me: http://www.vim.org/scripts/script.php?script_id=720 Unfortunately it's broken for me in vim70 (shame on me for not contacting the maintainer or fixing it myself). At the moment it doesn't properly control the width of the sidebar. I was hoping to use only one function key that would cycle through my sidebars; maybe CTRL-FX would drop a sidebar or prompt to add another. Thanks for you code! -- Ian Tegebo
Re: Wish, Kate like file list.
On 4/12/07, Edd Barrett [EMAIL PROTECTED] wrote: Hi, This might already be possible, please excuse me if it is. I love the editting features of vim, but find that navigating between open files is quite difficult. Ideally I think I would be quite confortable with a kate like interface for listing open files: http://www.kde.org/screenshots/images/3.1/fullsize/2.png (screenshot) You might want to look at winmanager: http://robotics.eecs.berkeley.edu/~srinath/vim/snapshot2.JPG http://www.vim.org/scripts/script.php?script_id=95 It seems a very popular plugin for accomplishing this. If you search for 'tree' or 'file explorer' in the scripts section you'll see many more options. -- Ian Tegebo
mark block from unknown position
Hi, I am trying to automate this: There is a file, which contains one path/filename at each line. Lines with equal files (contents wise) are grouped together. Groups are separated by # ---' (or whatever you want). To sort the lines of one group only I want to put the group into a visual block (correcht naming?) as part of a macro. First step of the macro will be the search for a certain directory. Next will be the creation of the visual block. Since I dont know, whether the line containing the searched directory cames first in the group or last or wherever, and how large the group is, I cannot do things like mark next 3 lines or so. Now I am looking for the command doing mark this group visually. How can I acchieve this? Another question is: If I have created a useful macro -- is there a way to store this macro in .vimrc (or wherever) so that it does not get lost ? Thank you very much in advance for any help ! :) Keep editing! mcc -- Please don't send me any Word- or Powerpoint-Attachments unless it's absolutely neccessary. - Send simply Text. See http://www.gnu.org/philosophy/no-word-attachments.html In a world without fences and walls nobody needs gates and windows.
Re: mark block from unknown position
Hi, [EMAIL PROTECTED] schrieb: I am trying to automate this: There is a file, which contains one path/filename at each line. Lines with equal files (contents wise) are grouped together. Groups are separated by # ---' (or whatever you want). To sort the lines of one group only I want to put the group into a visual block (correcht naming?) as part of a macro. you don't need a visual block here. Say you have the following file # --- 3.txt 2.txt 1.txt # --- 6.txt 5.txt 4.txt # --- 9.txt 7.txt 8.txt # --- Then :g/^# ---/+1,/^# ---/-1!sort will sort it by file names inside your groups. This command will emit an error message E16: Invalid range for the last marker, which you can safely ignore. Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin)
Re: mark block from unknown position
Hi,, [EMAIL PROTECTED] wrote: J?rgen Kr?mer [EMAIL PROTECTED] [07-04-12 13:12]: Hi, [EMAIL PROTECTED] schrieb: I am trying to automate this: There is a file, which contains one path/filename at each line. Lines with equal files (contents wise) are grouped together. Groups are separated by # ---' (or whatever you want). To sort the lines of one group only I want to put the group into a visual block (correcht naming?) as part of a macro. you don't need a visual block here. Say you have the following file # --- 3.txt 2.txt 1.txt # --- 6.txt 5.txt 4.txt # --- 9.txt 7.txt 8.txt # --- Then :g/^# ---/+1,/^# ---/-1!sort will sort it by file names inside your groups. This command will emit an error message E16: Invalid range for the last marker, which you can safely ignore. Thanks for your reply ! :) Sort was only an example...is it possible to mark the group visually ? yes. While in normal mode enter /^# ---/+CRV/^# ---/- where CR means Press the Return/Enter key. After that the lines between two consecutive markers are visually selected. Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin)
Re: Basic question, CTRL+Wh on Gvim, Win XP
Tim Chase wrote: In general, the safest keys to use for the {lhs} (left-hand side) of mappings are the F keys. Almost everything else already has a function in Vim. Among Worth knowing. Thanks. What about when using a leader such as , or / ? The comma does a reverse-search of the last thing you searched for using t/T/f/F which many folks don't use (so they use it for leader), but I use regularly. :help , :help ; The forward slash does searching...something used quite regularly. :help / I think the only key that isn't reserved (in that Vim doesn't already have meaning assigned to it) is the backslash, which is what the leader defaults to (so in a way, it is used...but only for the purpose you describe). I tend to use the default backslash as my leader (on those rare occasions I use the leader) because I know it's available and it's vim-portable. One other candidate might be the underscore, though it's a shifted key which makes it a little more difficult, it is usually in a pretty predictable place (unlike the backslash/pipe key which I find all over the keyboard depending on whose machine I'm using...makes typing DOS file-paths a pain). Just my $0.02 -tim Even the underscore's location may vary. On my Belgian keyboard it is shift-minus (at far upper right) but IIRC on French keyboards it is unshifted 8. At least it uses at most only the Shift key (which exists on both sides of the keyboard, not the AltGr key, as (on my keyboard) both \ and | do; and since they are at far lower left and far upper left respectively, it makes them only barely keyable with one hand (I usually use my left hand either to rest my chin or to hold a book I'm typing from :-) ). I don't use _ in Vim; it has a function though... move to the first nonblank of the (count - 1)th line down: sames as +k or Enterk Best regards, Tony. -- Did you ever see a Hit any key to continue message in a music piece?
Re: CTRL+gf new tab position
Dave Land wrote: [...] Oddly enough, this mapping also takes over plain old control-g, which is fine for me. [...] There's nothing odd to that: in cooked input mode (as used by Vim), Ctrl-G and Ctrl-g both (by design) map to the BEL character, 0x07. This applies to any Ctrl+letter combination: in ASCII (not EBCDIC), Ctrl+letter = (letter AND 0x17) where letter is in the range [a-zA-Z]. Best regards, Tony. -- From the moment I picked your book up until I put it down I was convulsed with laughter. Some day I intend reading it. -- Groucho Marx, from The Book of Insults
Finding something conatined in two lines?
Hi, Suppose there is a file containing a path/filename -- in each line: # a.txt b.txt c.txt # 1.txt 2.txt 3.txt 4.txt # 1.txt 3.txt 4.txt # Now I want to replace any combination of 1.txt 2,txt by - say - x.txt Is there a way to expand / of two/more lines ? Keep editing! mcc -- Please don't send me any Word- or Powerpoint-Attachments unless it's absolutely neccessary. - Send simply Text. See http://www.gnu.org/philosophy/no-word-attachments.html In a world without fences and walls nobody needs gates and windows.
Re: Finding something conatined in two lines?
Hi, [EMAIL PROTECTED] wrote: Suppose there is a file containing a path/filename -- in each line: # a.txt b.txt c.txt # 1.txt 2.txt 3.txt 4.txt # 1.txt 3.txt 4.txt # Now I want to replace any combination of 1.txt 2,txt by - say - x.txt Is there a way to expand / of two/more lines ? you can represent an end-of-line inside a regular expression with \n :%s/^1\.txt\n2\.txt$/x.txt/ Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin)
Re: Basic question, CTRL+Wh on Gvim, Win XP
One other candidate might be the underscore, though it's a shifted key which makes it a little more difficult, it is usually in a pretty predictable place (unlike the backslash/pipe key which I find all over the keyboard depending on whose machine I'm using...makes typing DOS file-paths a pain). Even the underscore's location may vary. Ah...good to know. In supporting our office, all of which have US QWERTY layouts, I have to look for the backslash on each machine I visit but the underscore is at least predictably shift plus the key to the right of zero which contains the minus and underscore. As for the backslash, on one, it's above a flat Enter key to the right of the ]/} key. On another it's between the Backspace and the =/+ key. On another coughfreakcough keyboard, it's *between* the single-quote and the enter-key (let me say I curse that keyboard every time I use it). Another keyboard has it down to the left of the spacebar. Gotta love standards...reminds me of a certain proposed standard with things like autoSpaceLikeWord95 footnoteLayoutLikeWW8 where it's standard unless I decide to change something for an arbitrary reason. :) However, I can't say I ever use the underscore for it's default purpose (I tried it once and thought that's not gonna be useful). -tim
RE: delete buffer questions
-Original Message- From: alebo [mailto:[EMAIL PROTECTED] Sent: Monday, April 09, 2007 2:51 PM To: [EMAIL PROTECTED] Subject: delete buffer questions I need som things explained about the automatic delete buffers 1-9. When I delete rows using dd the deleted text is put in the default buffer, using dd again will put it in 1 and so on. But if I use another kind of deletion like dw, I couldnt fetch it from the buffers 1-9, only from the first unnamed buffer. Why is this so and which kind of delete operations are supported in the delete buffers? You might want to try my plugin: YankRing.vim : Maintains a history of previous yanks and deletes http://www.vim.org/scripts/script.php?script_id=1234 Vim already maintains a list of numbered registers containing the last 9 deletes. These previous deletes can be referenced using [register]p, so 1p will paste the last delete, 2p the 2nd last delete. For more information see |quote_number|. Vim does not provide any mechanism to reference previous yanked text. In Emacs this feature is called the kill ring. The yankring plugin allows the user to configure the number of yanked and deleted text. A split window can be used to choose which element(s) from the yankring you wish to paste. Alternately after text has been pasted (using p), it can be replaced with a previous value from the yankring with a single key stroke. A tutorial is included to take you through the various features of the plugin. After you have installed the plugin just run: :h yankring.txt :h yankring-tutorial ... Pressing F11 (default key) will bring up the list of all recent yanks and deletes. From there you can choose which one you need to paste. HTH, Dave
Setting font in console vim
Vim 7 WinXP I can set the font in gvim using: Set guifont= But how do I do the same with console vim? Help, helpgrep and searching this list hasn't found me an aswer. TIA, Dave
Re: Setting font in console vim
I can set the font in gvim using: Set guifont= But how do I do the same with console vim? It relies on the font your console uses. Thus, if you're using a xterm/rxvt/konsole/whatver, you can set your display font for the terminal application and vim uses it. If you're an an SSH session such as Putty, Putty has the ability to configure the display font. If you're using the raw console outside of X, there are a variety of programs to set that font (you should be able to read more at setfont(8)/consolechars(8) in your man pages, depending on your distro). For Win32's cmd.exe/command.com there are settings for that as well in which you can change the display font for the whole session, which non-g-vim uses. Gvim controls its own display and can thus configure the fonts. Regular vim relies on the controlling display and thus can't configure its fonts. -tim
Re: Setting font in console vim
* [EMAIL PROTECTED] [2007.04.12 10:30]: I can set the font in gvim using: Set guifont= But how do I do the same with console vim? You change the console font. :-) If you use cygwin I can tell you how I do it for rxvt or xterm. -- JR
clewn inclusion?
hi everyone, I was wondering how likely inclusion of the clewn[1] project in vim would be? I have to admit I have no idea how deep the changes are and if the patches include any evil hacks.. What I do know is that it seems to do a pretty good job at making gdb a bit more usable by incorporating it in my editor of choice. So what's with that ? regards, Tobi [1] http://clewn.sourceforge.net/
Re: clewn inclusion?
Am Donnerstag, den 12.04.2007, 17:18 +0200 schrieb Tobias Pflug: hi everyone, I was wondering how likely inclusion of the clewn[1] project in vim would be? I have to admit I have no idea how deep the changes are and if the patches include any evil hacks.. What I do know is that it seems to do a pretty good job at making gdb a bit more usable by incorporating it in my editor of choice. So what's with that ? regards, Tobi [1] http://clewn.sourceforge.net/ Stupid me.. obviously I wanted to referto vimgdb and not clewn. clewn is an external solution, vimgdb is a vim patch..
Re: what is the language for vim development
flyfish wrote: Hi, i would like to do some contribution in vim development, i have used vim more than one year in programming and text edit, but when i want to start to code for vim, i even do not know what language is used for vim development, could you give me some information and steps how to do? It all depends what you want to develop: if you want to add syntax highlighting for a new filetype, for instance, just add a few scripts in vim-script language. It's only when Vim needs to be recompiled that other languages must be used: * Without recompilation: - the global plugins, filetype plugins, indent plugins, syntax scripts, colorschemes, etc. are in vimscript - keymaps can be regarded as vimscript too, but the bulk of a keymap is inline data for one :loadkeymap statement - the message translations (*.po) are in yet another format - the documentation uses a special text format, with, among others, hyperlinks from |this| to *this* * With recompilation: - most of the Vim code is in C - On Windows, the OLE and Global IME modules are in C++ - the Perl module (if_perl.xs) is in some language that uses Perl to produce an intermediary C module * Tools for Vim compilation: - one makefile per compiler/platform/source directory - on Unix platforms, input files for configure Best regards, Tony. -- He was so narrow minded he could see through a keyhole with both eyes ...
Vim OLE and C#
I have the following VB code: Dim Vim As Object Set Vim = CreateObject(Vim.Application) Vim.SendKeys ESC:e I want to do the samething in C# (of which my skills are quite weak). I have the following: object Vim; Vim = Activator.CreateInstance(Type.GetTypeFromProgID(Vim.Application)); Vim.SendKeys(ESC:e ); Most of that was grabbed from Google. Compiler error: Error 3 'object' does not contain a definition for 'SendKeys' ... I am assuming I must strongly type the object, so I tried: Vim.Application Vim; Error 3 The type or namespace name 'Vim' could not be found (are you missing a using directive or an assembly reference?)... Any suggestions? Once I get this working I will get it added under this section in the Vim help: :h ole-activation Thanks, Dave
hilight blocks
Is there any simple way to have custom blocks of code highlighted and the remaining code outside the blocks not highlighted? For example: # file.txt some plain text [my-custom-tag] some custom text [/my-custom-tag] Some more plain text ... # end of file So the idea would be to open VIM using file.txt and the code inside the custom tags would be highlighted. Thanks, K
Re: hilight blocks
On 4/12/07, Kirk [EMAIL PROTECTED] wrote: Is there any simple way to have custom blocks of code highlighted and the remaining code outside the blocks not highlighted? For example: # file.txt some plain text [my-custom-tag] some custom text [/my-custom-tag] Some more plain text ... # end of file So the idea would be to open VIM using file.txt and the code inside the custom tags would be highlighted. I've been working something very similar for highlighting code examples in vim helpfiles. As an example: = Begin Example Block: MyExample let s:myvar = testing call myfunc(an arg) Text that shouldn't get highlighted. = End Example = --- Begin Code - syn include @VimL syntax/vim.vim syn match blocktestPrefix /^Block:/ contained nextgroup=blocktestDesc syn match blocktestDesc /\(Block:\)\@=.*$/ contained syn region blocktestText contains=blocktestPrefix,blocktestDesc,blocktestBody,@VimL start=/^Block:.*$\n^\s\+/me=s+1 end=/^\S/me=s-1 Highlight Linking hi def link blocktestPrefix Todo hi def link blocktestDesc PreProc hi def link blocktestBody Label hi def link blocktestComment Comment -- End Code - I found |syntax.txt| and |usr_44.txt| to be helpful. -- Ian Tegebo
Re: hilight blocks
On 2007-04-12, Kirk [EMAIL PROTECTED] wrote: Is there any simple way to have custom blocks of code highlighted and the remaining code outside the blocks not highlighted? For example: # file.txt some plain text [my-custom-tag] some custom text [/my-custom-tag] Some more plain text ... # end of file So the idea would be to open VIM using file.txt and the code inside the custom tags would be highlighted. How about this? match Todo '\[my-custom-tag]\zs\_.\{-}\ze\[/my-custom-tag]' where you can certainly choose some highlight group other than Todo. You can put that line just as it is into your .vimrc, or put it in an after/ftplugin/txt.vim file, or create an autocommand to invoke it on just the files you want. HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Mobile Broadband Division | Spokane, Washington, USA
Re: disabling abbreviations inside comments
Resending due to delivery failure. Sorry for any inconvenience I have some iabbreviations defined. The problem is that the iabbrs get expanded even while I am writing comments (in VHDL). Is there a way to detect that I am currently typing a comment (line that has -- anywhere before the cursor), and temporarily disable abbreviation expansion? When I finish typing the comment, I would like all the abbreviations to be expanded as usual. Thanks Mrinal
RE: hilight blocks
I like this one, I put it in my local ~/.vimrc file and it works for VIM (v6.1.3). But when I load this on another machine running VIM (v6.3) I get this error: bash-2.05$ vi file Error detected while processing /export/home/me/file: line6: E28: No such highlight group name: Comment '\[perl]\zs\_.\{-}\ze\[/perl]' Hit ENTER or type command to continue What am I missing? Contents of .vimrc: :set number :set hlsearch :set incsearch :set ignorecase :set shiftwidth=3 match Comment '\[perl]\zs\_.\{-}\ze\[/perl]' Thanks, K -Original Message- From: Gary Johnson [mailto:[EMAIL PROTECTED] Sent: Thursday, April 12, 2007 12:05 PM To: [EMAIL PROTECTED] Subject: Re: hilight blocks On 2007-04-12, Kirk [EMAIL PROTECTED] wrote: Is there any simple way to have custom blocks of code highlighted and the remaining code outside the blocks not highlighted? For example: # file.txt some plain text [my-custom-tag] some custom text [/my-custom-tag] Some more plain text ... # end of file So the idea would be to open VIM using file.txt and the code inside the custom tags would be highlighted. How about this? match Todo '\[my-custom-tag]\zs\_.\{-}\ze\[/my-custom-tag]' where you can certainly choose some highlight group other than Todo. You can put that line just as it is into your .vimrc, or put it in an after/ftplugin/txt.vim file, or create an autocommand to invoke it on just the files you want. HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Mobile Broadband Division | Spokane, Washington, USA
Re: what is the language for vim development
Hi, Thank you very much for such useful information, i started to read the usr_42.txt help file and it starts with a menu.vim file to explain how to add new menu, i do not want to add module now, but i only want to know what is the vim script language it is? and where to start to learn such language and if it is necessary to learn or just study to use it from some existing script code? Thank you very much. Reid Thompson wrote: flyfish wrote: Hi, i would like to do some contribution in vim development, i have used vim more than one year in programming and text edit, but when i want to start to code for vim, i even do not know what language is used for vim development, could you give me some information and steps how to do? http://www.vim.org/download.php http://svn.sourceforge.net/viewvc/vim/vim7/ the language is C. -- View this message in context: http://www.nabble.com/what-is-the-language-for-vim-development-tf3562125.html#a9968533 Sent from the Vim - General mailing list archive at Nabble.com.
Re: hilight blocks
On 2007-04-12, Kirk [EMAIL PROTECTED] wrote: -Original Message- From: Gary Johnson [mailto:[EMAIL PROTECTED] Sent: Thursday, April 12, 2007 12:05 PM To: [EMAIL PROTECTED] Subject: Re: hilight blocks On 2007-04-12, Kirk [EMAIL PROTECTED] wrote: Is there any simple way to have custom blocks of code highlighted and the remaining code outside the blocks not highlighted? For example: # file.txt some plain text [my-custom-tag] some custom text [/my-custom-tag] Some more plain text ... # end of file So the idea would be to open VIM using file.txt and the code inside the custom tags would be highlighted. How about this? match Todo '\[my-custom-tag]\zs\_.\{-}\ze\[/my-custom-tag]' where you can certainly choose some highlight group other than Todo. You can put that line just as it is into your .vimrc, or put it in an after/ftplugin/txt.vim file, or create an autocommand to invoke it on just the files you want. HTH, Gary I like this one, I put it in my local ~/.vimrc file and it works for VIM (v6.1.3). But when I load this on another machine running VIM (v6.3) I get this error: bash-2.05$ vi file Error detected while processing /export/home/me/file: line6: E28: No such highlight group name: Comment '\[perl]\zs\_.\{-}\ze\[/perl]' Hit ENTER or type command to continue What am I missing? Contents of .vimrc: :set number :set hlsearch :set incsearch :set ignorecase :set shiftwidth=3 match Comment '\[perl]\zs\_.\{-}\ze\[/perl]' I don't know. :help hicolors and :help group-name in vim 7.0 both include the Comment group. The Comment group is used in so many examples in the vim help files and comments are such common aspects of programming languages that I would think that that group has existed since vim first had highlight groups. I see that if I start vim as 'vim -u NONE' and execute :verbose hi Comment I get the error message E411: highlight group not found: Comment but if I then execute :syn manual :verbose hi Comment I get the response Commentxxx term=bold ctermfg=4 guifg=Blue Last set from ~/src/Linux/vim-7.0/share/vim/vim70/syntax/syncolor.vim So from that I conclude that you have to execute a :syn command of some sort in some initialization file before before referring to any of the highlight groups in your .vimrc. I'll bet the machine running vim 6.1.3 has an initialization file that includes :syn on and the machine running vim 6.3 does not. This is probably discussed in the vim manual someplace, but I didn't go looking for it. HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Mobile Broadband Division | Spokane, Washington, USA
Splint, Errorformat and Windows Paths
I am trying to get Splint output to be parsed by gVim errorformat. I have used the following error format with Splint 3.1.1 and Vim 7.0.152: :set errorformat=%A%f(%l\\,%c):\ %m,%+C\ %.%# This seems to work pretty well, except files with Windows (I'm using gVim on Windows XP) paths are not recognized using %f (or the errorformat is not quite right). For example foobar.c(line,column): error message IS recognized and the error is shown using :cn and :cp. The line containing C:\foo\bar\foobar.h(line,colum): error message is NOT recognized. Has anyone had any experience in this area or can anyone lend some insight? Second question: Can I save the current makeprg, change the makeprg to splint, run make, then change the makeprg back using a vim function? I've seen the local errorformat used which helps with the errorformat, but I haven't seen a local makeprg. Thanks, -- Keith Prickett
Re: disabling abbreviations inside comments
Hello, * On Thu, Apr 12, 2007 at 12:31:24PM -0700, Mrinal Nath [EMAIL PROTECTED] wrote: I have some iabbreviations defined. The problem is that the iabbrs get expanded even while I am writing comments (in VHDL). Is there a way to detect that I am currently typing a comment (line that has -- anywhere before the cursor), and temporarily disable abbreviation expansion? When I finish typing the comment, I would like all the abbreviations to be expanded as usual. My VimL-library suite lh-map-tools defines a few functions that helps implementing such abbreviations. - http://hermitte.free.fr/vim/ressources/lh-map-tools.tar.gz (Note: it also comes with a bracketing-system, and all the documentation you'll need - :h MapNoContext(), :h BuildMapSeq(). For more advanced mappings have a look at my CC++ ftplugins suite.) HTH, -- Luc Hermitte http://hermitte.free.fr/vim/
Troubles configuring vim (multi-questions)
I've been thinking of migrating to using vim (gvim) but I'm running into lots of difficulties on the road I just can't solve, and the documentation is... well, strange at best. * Is it possible to make the cursor stay at it's position even after scrolling it out of view? As it is it follows with your scrolling which is bad because if my mouse suddenly gets the idea of scrolling up you get pretty displaced as well as inserting text where it doesn't belong. Other problems is that a selection, or visual, is also stretched out as the cursor moves. * At the beginning of an indented line, why does normal mode put the cursor at the end of the first tab whereas insert mode is position at the beginning of the line like I think it should? It's annoying to move around in code like that. * Is it possible to enter insert mode for files that aren't modifiable? Obviously any changes can't be saved but the buffer shouldn't be any problems to modify. * Is it possible to close tabs with the middle mouse button? * I wanted the Home-button to act so that it first jumps to the first non-whitespace character of the current line (i.e. skip the indentation) and if Home is pressed when you're already at the first non-whitespace character or before then it should jump to the real beginning of the line, column #1. I made this function: function! HomeKey () let c = col(.) if c == 1 w else g0w if col(.) = c g0 endif endif endfunction This doesn't want to work properly. It extends the command window and dumps some code from the bottom of the .vimrc and then asks for pressing enter and lastly jumps to line #180 in the same file. If c == 1 nothing happens, it doesn't go all wild but that 'w' keypress isn't executed. Also I have noticed that g0 doesn't really take you back to beginning of the line but the beginning of the horizontal scroll. A problem, but it doesn't explain why the code is acting crazy. * In gvim, is it possible to have a drag-and-drop action open the dragged file into a new tab instead of a new buffer? Using the menu is just tedious, and you can't select multiple files either. * I want to check a string if it begins with something but I have no clue why. I was thinking of a regexp but the only way to use matching regexps is for highlights and substition regexps seems to operate on the whole file or a selection and no way to use them on strings. * Can the position of the tab bar be set to the bottom of the window instead of the top? -- View this message in context: http://www.nabble.com/Troubles-configuring-vim-%28multi-questions%29-tf3569025.html#a9970844 Sent from the Vim - General mailing list archive at Nabble.com.
[Help]How can I add some char before a block?
Hi all, How can I add some char before a block? Just like C++ comment. Before: Comment line1 Comment line2 Comment line3 Comment line4 After: //Comment line1 //Comment line2 //Comment line3 //Comment line4 Thanks. --- Best regards chenfangrong
Re: [Help]How can I add some char before a block?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 陈方荣 wrote: Hi all, How can I add some char before a block? Just like C++ comment. Use V to select the block you want, then type :s/^/\/\// Hope this helps, Ricky -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFGHtjniXbZ7NjlUcARAobAAJ41JhevS6njMUaTVPSTbsuaOb5LcQCg5Uek g90dvl8/hixZlSWmhlCWax8= =r5cj -END PGP SIGNATURE-
Re: [Help]How can I add some char before a block?
:help CTRL-V or :help CTRL-V-alternative and then :help blockwise-operators, :help v_b_I_example or you can try The NERD Commenter plugin: http://www.vim.org/scripts/script.php?script_id=1218 Hope it helps. Easwy 2007/4/13, Ricky Zhou [EMAIL PROTECTED]: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 陈方荣 wrote: Hi all, How can I add some char before a block? Just like C++ comment. Use V to select the block you want, then type :s/^/\/\// Hope this helps, Ricky -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFGHtjniXbZ7NjlUcARAobAAJ41JhevS6njMUaTVPSTbsuaOb5LcQCg5Uek g90dvl8/hixZlSWmhlCWax8= =r5cj -END PGP SIGNATURE-
Re: [Help]How can I add some char before a block?
If you just want to comment/uncomment your source in a easy way, try this plugin EnhancedCommentify 陈方荣 wrote: Hi all, How can I add some char before a block? Just like C++ comment. Before: Comment line1 Comment line2 Comment line3 Comment line4 After: //Comment line1 //Comment line2 //Comment line3 //Comment line4 Thanks. --- Best regards chenfangrong
Re: Troubles configuring vim (multi-questions)
OnionKnight [EMAIL PROTECTED] 写于 2007-04-13 08:22:06: I've been thinking of migrating to using vim (gvim) but I'm running into lots of difficulties on the road I just can't solve, and the documentation is... well, strange at best. It seems that Vim had a longer learning curve than other editors (the only exception is emacs, which has takes more than a life time to learn...). So, when you've got used to it, you'll no longer found it strange, and it will be powerful for you. * At the beginning of an indented line, why does normal mode put the cursor at the end of the first tab whereas insert mode is position at the beginning of the line like I think it should? It's annoying to move around in code like that. The answer is probably: VI do it in that way, and vim need to be compatible with VI. * Is it possible to enter insert mode for files that aren't modifiable? Obviously any changes can't be saved but the buffer shouldn't be any problems to modify. Sure, this is the default behavior. If yours are not, maybe you've been affected by system-wide startup scripts. try :set modifiable * I wanted the Home-button to act so that it first jumps to the first non-whitespace character of the current line (i.e. skip the indentation) and the beginning of the horizontal scroll. A problem, but it doesn't explain why the code is acting crazy. inside a script you're in command-mode, and the command w you've meant to should be in normal-mode, the correct way might be :normal w, :normal g0w, etc... * In gvim, is it possible to have a drag-and-drop action open the dragged file into a new tab instead of a new buffer? Using the menu is just tedious, and you can't select multiple files either. I don't use the mouse too often. I can use the vim buit-in file explorer and open files inside vim, which have no interaction with the menu at all. Remember: most vim features are invoked by command, not the menu. * I want to check a string if it begins with something but I have no clue why. I was thinking of a regexp but the only way to use matching regexps is for highlights and substition regexps seems to operate on the whole file or a selection and no way to use them on strings. What do you meant by string?, if you think a string should begin with quotation mark, then begin your search regexp with the quotation mark. -- Sincerely, Pan, Shi Zhu. ext: 2606
Re: [Help]How can I add some char before a block?
How can I add some char before a block? Just like C++ comment. Use V to select the block you want, then type :s/^/\/\// You can make this a little easier/shorter to type by using :s!^!// The alternative delimiters (you can use a variety of characters, though I tend to choose !, @, or #) allow you to include certain characters without concern for having to escape the primary delimiter. There's also blockwise-visual mode: :help v_b_I which can also be an easy/lazy way to do it, especially if you're already in blockwise-visual mode. -tim
答复: [Help]How can I add some char befo re a block?
--- Best regards 陈方荣 -邮件原件- 发件人: Tim Chase [mailto:[EMAIL PROTECTED] 发送时间: 2007年4月13日 :09:44 收件人: Ricky Zhou 抄送: 陈方荣; Vim 主题: Re: [Help]How can I add some char before a block? How can I add some char before a block? Just like C++ comment. Use V to select the block you want, then type :s/^/\/\// You can make this a little easier/shorter to type by using :s!^!// The alternative delimiters (you can use a variety of characters, though I tend to choose !, @, or #) allow you to include certain characters without concern for having to escape the primary delimiter. There's also blockwise-visual mode: :help v_b_I which can also be an easy/lazy way to do it, especially if you're already in blockwise-visual mode. -tim It's work. Thanks.
Re: Troubles configuring vim (multi-questions)
inside a script you're in command-mode, and the command w you've meant to should be in normal-mode, the correct way might be :normal w, :normal g0w, etc... Couldn't find anything about command-mode. How is it different from normal mode? Is each line treated as one command? Like g0w is treated as g0w instead of g0 and w? What do you meant by string?, if you think a string should begin with quotation mark, then begin your search regexp with the quotation mark. Not in the document, a string in the vimrc. What I'm trying do to is that if I press F5, which is my run button, and the file is located in my htdocs folder then it will be opened with my browser pointing at the file as seen by the server. elseif expand(%:p:h) == C:\\Program Files\\Apache\\htdocs execute !\C:\\Program Files\\Mozilla Firefox\\firefox.exe\ http://localhost/; . expand(%) It looks sorta like that right now. I want to check if the left side of the == operator begins with the right side. In Perl or Ruby it would be done as elseif expand(%:p:h) =~ /^C:\\Program Files\\Apache\\htdocs/ -- View this message in context: http://www.nabble.com/Troubles-configuring-vim-%28multi-questions%29-tf3569025.html#a9971777 Sent from the Vim - General mailing list archive at Nabble.com.
Re: 答复: [Help]How can I add some char before a block?
On 4/13/07, 陈方荣 [EMAIL PROTECTED] wrote: --- Best regards 陈方荣 -邮件原件- 发件人: Tim Chase [mailto:[EMAIL PROTECTED] 发送时间: 2007年4月13日 :09:44 收件人: Ricky Zhou 抄送: 陈方荣; Vim 主题: Re: [Help]How can I add some char before a block? How can I add some char before a block? Just like C++ comment. Use V to select the block you want, then type :s/^/\/\// You can make this a little easier/shorter to type by using :s!^!// The alternative delimiters (you can use a variety of characters, though I tend to choose !, @, or #) allow you to include certain characters without concern for having to escape the primary delimiter. There's also blockwise-visual mode: :help v_b_I which can also be an easy/lazy way to do it, especially if you're already in blockwise-visual mode. -tim It's work. Thanks. comment is not a mechinism designed to erase codes. using #if 0 ... #endif to erase a block of code. it's the right way and looks clean. -- woody then sun rose thinly from the sea and the old man could see the other boats, low on the water and well in toward the shore, spread out across the current.
OT: [Help]How can I add some char before a block?
陈方荣 [EMAIL PROTECTED] 写于 2007-04-13 09:08:49: Hi all, How can I add some char before a block? Just like C++ comment. Before: Comment line1 After: //Comment line1 Thanks. Offtopic: Generally, use comment character to comment out real code is not considered a good programming style. because comment should be comments, and there should be only real comments inside the comments. use #if 0 and #endif to comment out your code is a prefered way. -- Sincerely, Pan, Shi Zhu. ext: 2606
Re: Troubles configuring vim (multi-questions)
OnionKnight [EMAIL PROTECTED] 写于 2007-04-13 10:05:10: Couldn't find anything about command-mode. How is it different from normal mode? Is each line treated as one command? Like g0w is treated as g0w instead of g0 and w? Vim is a multi-mode editor, in different mode, it accepts completely different set of commands. So, commands accept in insert-mode may have completely different meaning in normal-mode. When you use normal-mode commands inside command-mode, vim will be crazy, since the meaning of the command is completely different in command-mode and normal-mode. Inside vim, you can see :help index then you'll got the idea what is the commands available in different mode. (use Ctrl-] to follow a link in help, use Ctrl-O to jump back) elseif expand(%:p:h) == C:\\Program Files\\Apache\\htdocs It looks sorta like that right now. I want to check if the left side of the == operator begins with the right side. In Perl or Ruby it would be done as elseif expand(%:p:h) =~ /^C:\\Program Files\\Apache\\htdocs/ What you need to see may be :help eval if you want to do regexp matching, you could use =~ instead of == see :help expression-syntax |expr4| expr5 == expr5 equal expr5 != expr5 not equal expr5 expr5 greater than expr5 = expr5 greater than or equal expr5 expr5 smaller than expr5 = expr5 smaller than or equal expr5 =~ expr5 regexp matches expr5 !~ expr5 regexp doesn't match expr5 ==? expr5 equal, ignoring case expr5 ==# expr5 equal, match case etc.As above, append ? for ignoring case, # for matching case you can use regexp match to do your match. -- Sincerely, Pan, Shi Zhu. ext: 2606
meta offtopic: UTF-8/vim/mutt/mrxvt
Hi, sorry for this meta offtopic question...but I need informations about some internals of vim... I am using mutt to compose and read mail. The editor for this is vim (surprised? :) Mutt/Vim are running on/in/at/on top off/with (or what else the correct preposition is... X-) mrxvt. And all this is running on a Linux 2.6.20.6 Gentoo Linux. Now: When I am receiving mail containing german umlauts, they will be displayed as \number inside mutt. Inside vim these mails are displayed correctly when cited -- most of the times. But in some cases the umlauts also get corrupted. Entering umlauts in vim is also no problem. Entering umlauts on the commandlind (zsh/mrxvt) also displayed them correctly. Filenames containing umlauts are displayed...hrmmm... encrypted but will be correctly expanded (TAB) when using the zsh completion system. These mix of it works and it does not work confuses me. Would vim be able to display german umlauts correctly if the system completly ignores/does not know of UTF-8 ? What is the trick I am missing to display german umlauts correctly with mutt? There are recipes out there in the internet which discribes the _complete_ change from ASCII to UTF-8 for mutt. But these recipes describes more or less the change either on base of a totally UTF-8 aware system (which seems not applicable in my case) or the a complete recompilation of the whole system as a migration from ASCII to UTF-8 ... which seems not to be needed in my case. The basic question is for me: How can vim display german umlauts correctly if the world outside of vim seems not to be completly UTF-8 aware? What do I need to change in the chain ? Thank you very much for your help in advance! Keep editing! mcc -- Please don't send me any Word- or Powerpoint-Attachments unless it's absolutely neccessary. - Send simply Text. See http://www.gnu.org/philosophy/no-word-attachments.html In a world without fences and walls nobody needs gates and windows.
Re: [Help]How can I add some char before a block?
Xi Juanjie wrote: If you just want to comment/uncomment your source in a easy way, try this plugin EnhancedCommentify I am a newbie. How to use it? I installed it like described. E.g. what should I write as Plug if I like to comment a visual block? Thanks Daniel -- View this message in context: http://www.nabble.com/-Help-How-can-I-add-some-char-before-a-block--tf3569153.html#a9973027 Sent from the Vim - General mailing list archive at Nabble.com.
Re: [Help]How can I add some char before a block?
dan123 wrote: Xi Juanjie wrote: If you just want to comment/uncomment your source in a easy way, try this plugin EnhancedCommentify I am a newbie. How to use it? I installed it like described. E.g. what should I write as Plug if I like to comment a visual block? Thanks Daniel Is this the way to use it? :map C-F6 ESC:','call EnhancedCommentify('no', 'Comment')CRj dan -- View this message in context: http://www.nabble.com/-Help-How-can-I-add-some-char-before-a-block--tf3569153.html#a9973243 Sent from the Vim - General mailing list archive at Nabble.com.