Re: Replacing current line with last-yanked register

2012-10-15 Thread Ben Schmidt
On 15/10/12 12:16 AM, Dotan Cohen wrote: On Sun, Oct 14, 2012 at 1:54 PM, Marcin Szamotulski msza...@gmail.com wrote: If you yanked the line then it is still in the 0 register. You can paste from it. Though this will be four keystrokes: V0p If you do that often you could use a map: vnoremap P

Re: PATH

2012-09-17 Thread Ben Schmidt
On 12/09/12 9:06 AM, Derek Ashley Thomas wrote: Oh, sorry I was not aware of vim-app on macports. The only additional comment I have is that you may want to have if has('gui') before changing the $PATH variable since you probably don't need to change it in terminal-vim. Also, my MacVim does not

Re: Good idea to remap s to $?

2012-08-05 Thread Ben Schmidt
On 5/08/12 10: 05 AM, Tim Chase wrote: On 08/04/12 18: 51, John Little wrote: On Saturday, August 4, 2012 11: 59:49 PM UTC+12, Daan wrote: I was thinking about remapping s to $, because: X-Original-Sender: mail_ben_schm...@yahoo.com.au X-Original-Authentication-Results: gmr-mx.google.com;

Re: vim: how to press enter after execution of external cmd

2012-08-01 Thread Ben Schmidt
On 1/08/12 1:05 PM, ping wrote: b.t.w, just curious is there anything about vim that you don't know of? :D Yeah, but I try not to answer those questions. Smiles, Ben. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying

Re: syntax highlighting question

2012-08-01 Thread Ben Schmidt
On 1/08/12 4:08 PM, Peter Miller wrote: i gather from the lack of response that my previous question has no feasible answer. You may yet get an answer. I don't think it's impossible to do javascript in strings, but it is a little tricky. It's the sort of area we delve into relatively rarely,

Re: vim: who/where/when set my ft?

2012-07-31 Thread Ben Schmidt
filetype=asciidoc Last set from /etc/vim/ftdetect/asciidoc_filetype.vim what is that /etc/vim/ folder doing here? runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim73,/usr/share/vim/vimfiles/after,~/.vim/after :scriptnames 1: /usr/share/vim/vimrc 2:

Re: vim: who/where/when set my ft?

2012-07-31 Thread Ben Schmidt
On 1/08/12 10:07 AM, Ben Schmidt wrote: filetype=asciidoc Last set from /etc/vim/ftdetect/asciidoc_filetype.vim what is that /etc/vim/ folder doing here? runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim73,/usr/share/vim/vimfiles/after,~/.vim/after :scriptnames 1: /usr/share

Re: vim: how to press enter after execution of external cmd

2012-07-31 Thread Ben Schmidt
On 1/08/12 7:38 AM, ping wrote: hi experts: I now everything after :!ext-prog will be treated as param of that ext-prog. so I can't :!ext-prog param1 param2 enter but then how to avoid keep typing enter in following cases? command! AsciidocA call s:Asciidoc2All() function! s:Asciidoc2All()

Re: vim: how to press enter after execution of external cmd

2012-07-31 Thread Ben Schmidt
thanks, but... I tried following, still I need to press 4 enter... function! s:Asciidoc2All() let a:destdir = /Dropbox/temp-transfer/ let a:filebasename = %:t:r let tohtml = silent w|!asciidoc -a toc -a toclevels=6 -o . a:destdir . / . a:filebasename . .html \%\ let tofodt = silent w|!asciidoc

Re: Filetype detection on vim

2012-07-30 Thread Ben Schmidt
On 30/07/12 3:10 PM, Gary Johnson wrote: On 2012-07-29, Ben Fritz wrote: On Saturday, July 28, 2012 11:10:35 PM UTC-5, Tony Mechelynck wrote: On 27/07/12 12:49, ansuman wrote: I want to add a new filetype with extention .pn. For this I had done following: I went to vim installation

Re: when to use ' or

2012-07-30 Thread Ben Schmidt
On 30/07/12 1:10 PM, Bee wrote: On Jul 29, 7:24 pm, Ben Fritzfritzophre...@gmail.com wrote: On Friday, July 27, 2012 7:02:52 PM UTC-5, Bee wrote: I tend to use ' around strings passed as arguments to functions or commands, and use for comments. Comments... Please I use for strings

Re: Filetype detection on vim

2012-07-30 Thread Ben Schmidt
On 31/07/12 11:49 AM, ping wrote: On 7/30/2012 9:28 PM, Gary Johnson wrote: On 2012-07-30, ping wrote: What I recommend is to add a new filetype.vim in one of the following places (shown as they would appear in Vim): - Single-user on Windows $HOME/vimfiles/filetype.vim I actually

Re: vim: who/where/when set my ft?

2012-07-30 Thread Ben Schmidt
On 31/07/12 11:03 AM, ping wrote: On 7/30/2012 5:45 PM, Tim Chase wrote: On 07/30/12 16:38, ping wrote: guys: I just run into an annoying issue. I open a text file and found it was set to some filetype (say, asciidoc). this is not what I expected. how to find out which config lines in which

Re: esc and cursor position

2012-07-21 Thread Ben Schmidt
On 20/07/12 6:45 PM, sinbad wrote: why does theesc takes the cursor a position back. is there any specific for this ? In addition and response to what others have written, these two things may be of interest: 1. If you press i followed by Esc the cursor will move back, but if you press a

Re: wording ambiguity in help for 'Z' option in cpoptions.

2012-06-22 Thread Ben Schmidt
On 21/06/12 5:13 AM, Linda W wrote: In the help on cpoptions, I find this line confusing: Z When using w! while the 'readonly' option is set, don't reset 'readonly'. --- What does 'reset' mean? Yeah, a quick look at :help :set reinforces the ambiguity as well: 'Reset' is used to mean 'turn

Re: syntax highlighting question

2012-06-18 Thread Ben Schmidt
On 24/05/12 9:29 AM, Kartik Agaram wrote: Lisp symbols can usually contain ':', but I'm using a dialect where ':' is special syntax. I'd like to highlight it like parens. A) My first attempt was the following: au BufReadPost *.lisp syntax match Delimiter /:/ (The autocmd is to apply this

Re: folding regions in php

2012-06-18 Thread Ben Schmidt
On 13/04/12 9:59 PM, André Rodier wrote: Thanks for your answer, Basically, I want to fold portions of code, encoded by #region / #endregion blocks, but I don't want to loose the ability to fold classes and methods as well. This need is crucial when you have a class with 15-20 methods, and you

Re: Compiling MacVim

2012-06-18 Thread Ben Schmidt
, it's a Mercurial clone of MacVim's Git repository with some patches applied, but that shouldn't make any difference!). Note that because I use MacPorts (and have their ports of python, etc. installed), I have the /opt/local stuff. cd src ./configure LDFLAGS=-L/opt/local/lib \ --with-modified-by=Ben

Re: folding regions in php

2012-04-13 Thread Ben Schmidt
On 12/04/12 4:56 PM, André Rodier wrote: Hello everybody, I am using vim for web sites development, especially in PHP. I am happy so far with the PHP code folding by default,probably the syntax method. When I have a big php class with a lot of methods, I like to organise the code by sections,

Vim exit status

2012-04-06 Thread Ben Schmidt
Hi! Does anyone know where Vim's behaviour regarding its exit status is documented? I can't find it, but some strange things are happening, so I'm interested in finding out why. Ben. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you

Re: Press ENTER or type command to continue behavior is different between gvim and terminal vim

2012-04-06 Thread Ben Schmidt
On 22/03/12 5:37 PM, H Xu wrote: Hello, For the following vim script in a tmp.vim file: :!echo 1 :!echo 2 When executing :so tmp.vim in a terminal vim (I'm on Konsole of KDE), the output is like this: 1 Press ENTER or type command to continue 2 Press ENTER or type command to continue But

Re: Character count in current paragraph

2011-11-24 Thread Ben Schmidt
On 24/11/11 5:32 PM, Christian Brabandt wrote: On Thu, November 24, 2011 5:56 am, Ben Schmidt wrote: Hi, guys! Looking for some Vim voodoo a little bit outside my areas of expertise! I'd like to put the number of characters in the current paragraph (i.e. area between empty lines) in my ruler

Character count in current paragraph

2011-11-23 Thread Ben Schmidt
Hi, guys! Looking for some Vim voodoo a little bit outside my areas of expertise! I'd like to put the number of characters in the current paragraph (i.e. area between empty lines) in my ruler, or have it displayed when I press a key (either will do). That will save me having to exit normal

Re: Matches with zero width if the preceding atom does NOT match at the current position.

2011-08-19 Thread Ben Schmidt
I'm including the mailing list again, so others can see the answer and perhaps help further. On 19/08/11 2:24 PM, baumann Pan wrote: HI Ben, Thanks in advance. Still have question. from the pattern a.\{-}p\@!, I can tell: if the pattern is a.\{-}p, it will match ap, p and

Re: Matches with zero width if the preceding atom does NOT match at the current position.

2011-08-19 Thread Ben Schmidt
from the pattern a.\{-}p\@!, I can tell: [...] 'a' matches because .\{-} could be zero characters 'ap' matches because .\{-} matches the p, I don't think .\{-} will p, since \{-} is matching as few as possible. \{-} doesn't just mean as few as possible, it means as few as possible to make

Re: Matches with zero width if the preceding atom does NOT match at the current position.

2011-08-18 Thread Ben Schmidt
Hi, One mailing list is probably enough to post your questions to! :-) I'm only replying on vim_use. On 19/08/11 2:02 AM, baumann Pan wrote: Hi Gurus, I could not understand the descriptions below about the usage of \@!. a.\{-}p\@! will match any a, ap, aap, etc. that isn't followed

Re: Make :saveas save to path of current file

2011-08-18 Thread Ben Schmidt
On 19/08/11 8:23 AM, John Beckett wrote: lessthanideal wrote: Suppose the current working directory is C:\ and I am editing C:\temp\test.txt. I issue the command :saveas test2.txt The file is saved as C:\test2.txt, hHow can I make it be saved as C:\temp\test2.txt? The way :saveas is

Re: Is there anyway that Vim can 'tag' or 'name' a window for future reference?

2011-08-14 Thread Ben Schmidt
The problem I have is: the more I work on this window layout, the more I feel that Vim lacks of facilities to identify windows, for example, if I want to implement a customized command to exchange the files between current window and window 1, I don't have a straightforward way to identify the

Re: How to detect quote block of help file

2011-08-03 Thread Ben Schmidt
On 3/08/11 4:04 PM, niva wrote: Hi, I don't succeed to detect this kind of pattern: some text foo What have you tried? In what way, or for what purpose, do you want to detect it? Ben. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below

Re: Detecting Encrypted File

2011-08-03 Thread Ben Schmidt
On 1/08/11 7:35 PM, Paul wrote: On Mon, Aug 01, 2011 at 09:40:27AM +1000, Ben Schmidt wrote: BufReadPost should also work, and won't trigger every time you move the cursor into the encrypted file's window/buffer. I agree, it should work... but neither of these do: au! BufReadPost * if !empty

Re: Detecting Encrypted File

2011-07-31 Thread Ben Schmidt
On 1/08/11 5:46 AM, Paul wrote: On Sun, Jul 31, 2011 at 09:51:00PM +0400, ZyX wrote: Try BufWinEnter, BufEnter or such. I don't really know which events are launched after file is decrypted. Either of those work, thank you. BufReadPost should also work, and won't trigger every time you move

Re: detecting first and last line of the current paragraph

2011-07-23 Thread Ben Schmidt
I wanted to thank you guys for the patience, and for all the tips. I am quite new with Vimscript, so everything is hard to me. But that is the reason I keep trying, to learn and to educate myself. Sorry for bothering you guys. As I said, trying to educate myself with Vimscript, You don't need

Re: detecting first and last line of the current paragraph

2011-07-22 Thread Ben Schmidt
Thanks a lot for all your comments! For this particular purpose, the visual way is perfect. However, I am still interested in the regex way, because that will allow me to do other things with the paragraph and not only adding a char at the beginning. Note that you can do a lot with the visual

Re: detecting first and last line of the current paragraph

2011-07-21 Thread Ben Schmidt
On 22/07/11 9:56 AM, Jose Caballero wrote: Hi, I am trying to write a function to comment all lines of code in a block. Note the main purpose for this is to educate myself on vim scripting, given I am quite new with it. I am sure there are many other solutions to do it, and much better, but I

Re: arrow keys don't move cursor but output ABCD in INSERT mode

2011-07-19 Thread Ben Schmidt
On 7/07/11 12:00 PM, Ben Schmidt wrote: On 6/07/11 11:40 PM, Ben Schmidt wrote: On 4/07/11 10:56 PM, Tim Chase wrote: On 07/04/2011 03:07 AM, Kent wrote: last weekend I finally did the switch from .vim to vim-addon-manager. after the change, I made some small tests, almost everything looks

Re: arrow keys don't move cursor but output ABCD in INSERT mode

2011-07-06 Thread Ben Schmidt
On 4/07/11 10:56 PM, Tim Chase wrote: On 07/04/2011 03:07 AM, Kent wrote: last weekend I finally did the switch from .vim to vim-addon-manager. after the change, I made some small tests, almost everything looks fine. but the arrow key don't move cursor in INsert mode any longer, just ouput A,

Re: arrow keys don't move cursor but output ABCD in INSERT mode

2011-07-06 Thread Ben Schmidt
On 6/07/11 11:40 PM, Ben Schmidt wrote: On 4/07/11 10:56 PM, Tim Chase wrote: On 07/04/2011 03:07 AM, Kent wrote: last weekend I finally did the switch from .vim to vim-addon-manager. after the change, I made some small tests, almost everything looks fine. but the arrow key don't move cursor

Re: Improved saving of history in viminfo

2011-06-29 Thread Ben Schmidt
On 30/06/11 12:10 AM, ZyX wrote: It is known that if you launch multiple vim instances and then exit every instance will overwrite history stored in viminfo, so only history from the last vim instance will be added. Example: Initial viminfo: one command :echo 'Abc' in history. 1. Launch vim 1,

Re: How to retrigger 'autocmd' ?

2011-06-28 Thread Ben Schmidt
When I 'vimgrep' on a large file tree, I usually turn of 'autocmd' by ':noau vimgrep /xxx/ **/*.c'. Then I got c file open in a buffer but without the syntax highlighting (maybe also other good things). So I think what I need to do is to retriggle those 'autocmd' that would been usually

Re: Error with :.! commands

2011-06-27 Thread Ben Schmidt
Thanks for the mkdir suggestion. Next time I face it, it will come in handy. I made myself a command to do it some time ago, which you may find useful: command! Mktmpdir call mkdir(fnamemodify(tempname(),__:p:h),,0700) This is completely obscure to me. Where do I put this line? You put the

Re: what algorithm does :cnext use to jump to a correct location

2011-06-27 Thread Ben Schmidt
On 28/06/11 7:01 AM, cyboman wrote: i'm trying to write a small script which will jump between info/ warning/error messages, i.e. instead of jumping to the next message, which is what :cnext does, it will jump to the next error message. the problem is that i don't know how does :cnext do it. i

Re: Extending syntax files / overriding keyword with match

2011-06-26 Thread Ben Schmidt
On 27/06/11 6:56 AM, Benjamin R. Haskell wrote: On Sat, 25 Jun 2011, bendavis78 wrote: Hi, I'm extending the css.vim syntax file for use with a CSS framework using runtime! syntax/css.vim. You probably don't want the '!' there. That will run all syntax/css.vim files found in 'runtimepath'.

Re: expandtab not working for Ruby

2011-06-26 Thread Ben Schmidt
I've got expandtab set in my .vimrc file, but apparently it's not working. I'd never really noticed this because somehow it *is* working when I'm in a Rails project, but outside of that I still get tab characters. I've tried grepping for expandtab, or ruby, but I can't figure this one out, so

Re: redirect messages to stdout (windows)

2011-06-24 Thread Ben Schmidt
On 24/06/11 10:04 PM, sgp wrote: Is there a way to redirect vim messages to the Windows console? My makefile runs vim to pre-process some files. It does so with vim -c source preproc.vim -c wa -c qa input.c My issue is that while vim runs I have to keep watching the Windows console to spot if

Re: Error with :.! commands

2011-06-23 Thread Ben Schmidt
Thanks for the mkdir suggestion. Next time I face it, it will come in handy. I made myself a command to do it some time ago, which you may find useful: command! Mktmpdir call mkdir(fnamemodify(tempname(),:p:h),,0700) Ben. -- You received this message from the vim_use maillist. Do not

Re: Issue: clipboard=unnamed

2011-06-19 Thread Ben Schmidt
Since all actions to put something on the clipboard but the last one will be overwritten this could be improved. It's not so easy to make a generic solution though, instead of d for delete it could be any command. It would involve storing the text to be put on the clipboard internally and

Re: How to write command for select range of Chinese text

2011-06-17 Thread Ben Schmidt
you might try to identify hanzi as anything above 0xFF: assuming 'nocompatible' mode, searching on [^\x00-\xFF] might do it: this regexp atom matches anything above U+00FF, i.e., any hanzi, but (this is the caveat) also any non-Latin letter, any non-Western Latin letter, and the above-mentioned œ

Re: How to execute :s command without adding the search pattern to the search history?

2011-06-14 Thread Ben Schmidt
On 13/06/11 10:52 PM, Charles Campbell wrote: lith wrote: Hi, Is there a way to execute the :s or :/ command from a script without adding any patterns to the search history. I.e. is there a command like :keephistory (similar to :keepjumps) or any other solution that let's me execute a command

Re: write an nmap expr as a function?

2011-06-14 Thread Ben Schmidt
On 12/06/11 9:20 AM, Bee wrote: On Jun 11, 9:21 am, Beebeeyaw...@gmail.com wrote: On Jun 11, 1:55 am, Ben Schmidtmail_ben_schm...@yahoo.com.au wrote: Jump to start of nth or next block of 16 lines nnoremapexpr ]] \ v:count \ ? :C-Ucr.(v:count*16+1).Gzz \ : 17-line(.)%16.jzz

Re: How to execute :s command without adding the search pattern to the search history?

2011-06-14 Thread Ben Schmidt
Well, as histdel() had already been mentioned, I merely provided a few more alternatives. Ah, I must've missed that. Sorry! Ben. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit

Re: write an nmap expr as a function?

2011-06-14 Thread Ben Schmidt
On 15/06/11 12:49 AM, Ben Fritz wrote: On Jun 11, 3:55 am, Ben Schmidtmail_ben_schm...@yahoo.com.au wrote: In a function, you actually have to run the commands, not just return keystrokes like in an expr mapping. Something like this: But this is an expr mapping. The function can use the a

Re: write an nmap expr as a function?

2011-06-11 Thread Ben Schmidt
Jump to start of nth or next block of 16 lines nnoremapexpr ]] \ v:count \ ? :C-Ucr.(v:count*16+1).Gzz \ : 17-line(.)%16.jzz Why is the :C-UCR there? Doesn't that do nothing? Display line and block number nnoremap ][ :echo (line(.)-1)%16 line(.)/16 Listcr BUT this function is not

Re: vim and latin2 file encoding

2011-06-11 Thread Ben Schmidt
On 9/06/11 7:08 PM, Karol Samborski wrote: I have vim 7.3 installed on my fedora and I encountered a problem with opening files with latin2 encoding. Vim uses utf-8 encoding by deafult and it's OK for me but sometimes I need to edit file in latin2. I tried set fileencodings to utf-8,latin2 but

Re: Trying to escape tab in exe

2011-06-04 Thread Ben Schmidt
exec 'e' a:dir . /\t or execute 'e ' . a.dir . /\Tab :) Now we are getting somewhere. With your example above, I get the directory itself in a vim buffer window. Which is useful, but preferable, I want to see the wildmenu for the directory. As if I were to manually in

Re: delete inside parentheses VIM?

2011-05-29 Thread Ben Schmidt
On 29/05/11 1:11 PM, Antonio Recio wrote: dab it is useful to remove parentheses and content when cursor is over, I think. But I want to delete all the parentheses and the inside the parentheses with an unique commmand. In the whole file? This could work if they're not nested and not split

Re: Previewing files in localhost on Mac

2011-05-26 Thread Ben Schmidt
map F1 :wCR:!open -a Google\ Chrome `echo http://localhost/${PWD\#*/*/*/*/*/}/%`CR [...] Also, is there someone out there willing to break down this piece of code for me: ${PWD\#*/*/*/*/*/}. It manages to strip directories from the left of the string, but how? So far I looked here but it

Re: modifying hex codes with a regex replace

2011-05-26 Thread Ben Schmidt
+ 4 = 65. I would like to do this in gvim because I don't have access to a Perl compiler on the windows machine that will be performing this task. Thanks again On Wed, May 25, 2011 at 8:27 PM, Ben Schmidt mail_ben_schm...@yahoo.com.au mailto:mail_ben_schm...@yahoo.com.au wrote: On 26/05/11 1

Re: modifying hex codes with a regex replace

2011-05-26 Thread Ben Schmidt
have neglected. I haven't reviewed the docs, but just written a little from memory. Ben. On 27/05/11 12:26 AM, Ben Schmidt wrote: O, right! You just have to use an expression in the subsitute part (using \=), and nr2char(), char2nr() and submatch(). Whether you use literal characters or hex

Re: modifying hex codes with a regex replace

2011-05-26 Thread Ben Schmidt
perfectly, but it replace all my instances of ^@ with the carriage return (\x0a). When using hex escapes, sometimes the escaped characters are not inserted, yielding the replacement string: =2^Z^Y Any ideas? Dylan On Thu, May 26, 2011 at 9:26 AM, Ben Schmidt mail_ben_schm...@yahoo.com.au

Re: Keyboard left in a strange mode after ZZ

2011-05-26 Thread Ben Schmidt
On 27/05/11 1:02 AM, Richard Guse wrote: I'm using Vim 7.3 7/20/2010 under Windows 7. I usually start gvim from the command-line but sometimes from Windows Explorer. After I start, do my work then use ZZ to save/exit, it leaves the keyboard in a strange state relating only to the window which

Re: Compiling Vim with X on Mac

2011-05-26 Thread Ben Schmidt
I build with a standard toolset using ./configure and make. NO_X11_INCLUDES is only defined in and by the two Mac-specific source files named above. As one of the code comments says, this is to avoid a clash between definitions of Boolean in the X11 and Mac header files. All the actual GTK

Re: Compiling Vim with X on Mac

2011-05-25 Thread Ben Schmidt
On 26/05/11 2:19 AM, Bram Moolenaar wrote: Ben Schmidt wrote (quite a long time ago): Finally getting around to compiling Vim 7.3, and taking a little more interest in the mailing list again. Would love to get back into Vim development again if I can find time. I use Vim in X on the Mac (gtk2

Re: modifying hex codes with a regex replace

2011-05-25 Thread Ben Schmidt
On 26/05/11 1:34 AM, Floobit wrote: I'm trying to modify a series of binary files made with a legacy program, and need to change a certain character in my search string to the character with hex code +4. For context, here is my sed regex: :s!^@Heading level 1^@\+.\{-}^@\+\(\d\+\)^@\+Body

Re: quick fix doesn't process info and warning messages correctly

2011-05-24 Thread Ben Schmidt
set errorformat=\%f\\\,%l%*\\s%t%*\\a\ %n:\ %m lint set efm+=%I%%p~ lint multiline start set efm+=%C\%f\\\,%l%*\\s%t%*\\a\ %n:\ %m,%Z lint multiline later i tried reading more about the % in vim help but i can't quite understand what it means. would you be able to explain?. btw the formats

Re: quick fix to jump between warnings and errors

2011-05-24 Thread Ben Schmidt
On 25/05/11 1:46 AM, cyboman wrote: On May 4, 9:10 am, Ben Schmidtmail_ben_schm...@yahoo.com.au wrote: On 30/04/11 5:13 AM, cyboman wrote: the compiler and lint tool my company is using generate 3 kinds of messages:errors,warningsand info. right now my keys are mapped in such a way

Re: GVIM menu bar missing

2011-05-24 Thread Ben Schmidt
On 25/05/11 4:48 AM, Prashanth Prahalad wrote: When I open GVIM on solaris, the menu bar is missing. That's not a bug, it's a feature! :-D Ben. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information,

Re: quick fix doesn't process info and warning messages correctly

2011-05-23 Thread Ben Schmidt
First, note that it doesn't behave as you claim. I saved your example into a file, sourced your :set commands then did :cfile on the file saved earlier, and I got this in the quickfix window: || filepath1,123, Warning 3: this is a warning message 3 for filepath1 || filepath1, 432, Info 4: this

Re: errorformat, error/warning number with letters in it

2011-05-23 Thread Ben Schmidt
On 23/05/11 11:32 PM, cyboman wrote: my compiler produces errors/warnings in the following format: path\to\fiile1,line_number level[tag]: message (file1,53 Warning[Te551]: message for file 1) where level is either warning/info/error, and tag is usually two letters and a number (Te551). right

Re: quickfix, linker and erroformat

2011-05-23 Thread Ben Schmidt
On 24/05/11 4:06 AM, cyboman wrote: then linker my company is using has the following error format: Error[e46]: message ( path\to\the\offending\file.obj ) which is mapped in my errorformat as follows: set errorformat=%EError\[%.%n\]:\ %m\(\ %f\ \),%Z linker error which quickfix outputs as

Re: make terminal VIM my default text editor Ubuntu 11.04

2011-05-23 Thread Ben Schmidt
On 24/05/11 8:20 AM, Juan incaurgarat wrote: hi, ive spent the last two working days trying to make terminal VIM my default text editor with no luck. im using ubuntu 1104 and i dont like GVIM I don't use the same platform, so can't help with your actual question. However...why don't you like

Re: quick fix doesn't process info and warning messages correctly

2011-05-22 Thread Ben Schmidt
On 22/05/11 12:44 PM, cyboman wrote: the lint we are using outputs warnings and info messages. they are all in the same format: file_path,line_number message_type message_type_number: message where message_type is either warning or info however for some reason when a warning message is

Re: Vim errorformat for phpunit

2011-05-22 Thread Ben Schmidt
On 11/03/11 4:34 AM, Ben Godfrey wrote: I'm working on a Vim compiler plugin for PHPUnit. I've written the following errorformat. The error message is correctly extracted, but file and line numbers are not. CompilerSet errorformat=%E%n)\ %.%#, \%C%m,

Re: break line that is too line in QuickFix list

2011-05-20 Thread Ben Schmidt
does anybody know if there is a way to break a line of text that is too long in QuickFix list. say if the line is longer than 60 characters move the word to the next line. i'm sure there is a way to do this globally but i need it to be done only in QuickFix list window. any help is appreciated

Re: add items to a syntax file as a vertical list?

2011-05-19 Thread Ben Schmidt
On 20/05/11 4:16 AM, AMDx64BT wrote: I would like to edit the file syntax cpp.vim and include some new extensions to highlight. I would like to add these news extension as a vertical list, and not in the same line. The normal way: *syn keyword ITK a b c d e* The way that I would like to get,

Re: 'commandline' vs ':e' for jump to line (FEAT. REQ)

2011-05-18 Thread Ben Schmidt
On 18/05/11 5:38 PM, crabsody wrote: Hi Christian! No this is probably not what I want. But quickfix is a great feature I didn't know about. Thank you very much. I will check it out when I have the time to recompile vim with quickfix option. Now hat I want is to be able instead of issuing :e +3

Re: 'commandline' vs ':e' for jump to line (FEAT. REQ)

2011-05-18 Thread Ben Schmidt
On 18/05/11 9:27 PM, Tim Chase wrote: On 05/18/2011 03:32 AM, Ben Schmidt wrote: Here's a simple solution for .vimrc that might work: command! -nargs=1 -bang Edit call FileAndLine(e,bang,f-args) command! -nargs=1 -bang Split call FileAndLine(sp,bang,f-args) function! FileAndLine(cmd,bang,arg

Re: set GUI font inside function

2011-05-18 Thread Ben Schmidt
But when I'm using external monitor, I want my font to be bigger than 10. So I want to pass the font size as parameter. I've tried fun! DarkScheme(n) colorscheme molokai set gfn=Monaco .a:n and set gfn=Monaco\ .a:n and also set gfn=Monaco\ a:n call DarkIndentGuides() endf but it's not

Re: set GUI font inside function

2011-05-18 Thread Ben Schmidt
e.g. :exe set gfn=Monaco . a:n That space needs escaping for :set. :exe set gfn=Monaco\\ . a:n or :exe 'set gfn=Monaco\ ' . a:n Which is one reason why, as both of us agree, I think, using :let is better. Ben. -- You received this message from the vim_use maillist. Do not top-post!

Re: Puzzling error message after a throw

2011-05-17 Thread Ben Schmidt
function! Foo() throw 0 endfunction if 1 call Foo() endif When I execute the above script I get E605: Exception not caught: 0 [...] line6: E171: Missing :endif But I don't want to catch the exception. This arose in a situation where I want a command to stop

Re: indentexpr and = operator

2011-05-16 Thread Ben Schmidt
Sadly that's only documented in the lisp option, and not in indentexpr ... Good point. It sounds like adding a sentence to the help for 'indentexpr' is in order: May be overridden by the lisp indentation algorithm when 'lisp' is set. It also sounds like the help for = should be

Re: no TextExpander with MacVim?

2011-05-16 Thread Ben Schmidt
Here would be nice to use once in a while some of the features of TextExpander that I couldn't found in Vim, as the embeded images or the templates. Also very useful for me is the synchronisation of the TextExpander-snippets via Dropbox with my iPhone % iPad - something where MacVim's

Re: no TextExpander with MacVim?

2011-05-15 Thread Ben Schmidt
On 16/05/11 12:19 PM, Ben Fritz wrote: On May 14, 11:22 pm, Vlad Ghitulescuvlad.ghitule...@gmx.de wrote: Hello! I'm using MacVim Snapshot 57 on my iMac 3.06 GHz running Mac OS X 10.6.7 and I've just discovered that TextExpander (in the current version) doesn't work. What's TextExpander?

Re: Split open same file and edit only 1 window

2011-05-14 Thread Ben Schmidt
On 14/05/11 11:04 PM, encore wrote: Please advise whether it is possible to split open a file and edit only one of the open windows. No, you can't do that. Either copy the text of the file into a new buffer, or give the existing buffer a new name and then load the file again. E.g.: :e

Re: Callback on normal commands

2011-05-14 Thread Ben Schmidt
On 15/05/11 12:35 PM, Where Where wrote: Hello all, I want to tell call python function every time a user has completed a normal mode command. (For instance, I would not want to call the function after the user presses d but would want to call the function when the user has finished pressing

Re: Way to skip systemwide vimrc?

2011-05-13 Thread Ben Schmidt
That's a nice piece of Vimscript. Probably overkill for this situation, at least if only run at startup before there are likely to be any local variables, but it's still pretty cool. Now if we just had a way to do script vars Without ability to purge script variables this code should not

Re: Meaning of % before a command

2011-05-13 Thread Ben Schmidt
On 14/05/11 12:46 AM, parapara wrote: I looked up how to change tabs to spaces in a file and saw both :retab and :%retab as answers. Does the '%' change the meaning of the command? Usually it makes the command apply to the whole file rather than the current line only, but :retab applies to

Re: Way to skip systemwide vimrc?

2011-05-13 Thread Ben Schmidt
Mmm. I suspect a lot of plugins do this, and I think it's actually poor Vimscript. Why? Simply because it goes against established best practice. It sounds, however, like you have a more comprehensive solution to allow the user to load, suppress, unload and reload your plugins, and I think

Re: Abbreviations, but only within a certain file type

2011-05-12 Thread Ben Schmidt
On 12/05/11 11:05 PM, Kevin Steinhardt wrote: Forgive my ignorance once more, but is there a way to tell vim that I'd only like it to expand an abbreviation keyword if the file type is .htm, .html or .mkd? :help :abbreviate-local You can combine that with a filetype plugin, e.g. put iab

Re: Way to skip systemwide vimrc?

2011-05-12 Thread Ben Schmidt
On 13/05/11 5:02 AM, Benjamin R. Haskell wrote: Since that gets run before my ~/.vimrc, my runtimepath hasn't yet been setup. As far as I can tell, there's no way to disable /etc/vimrc (SYS_VIMRC_FILE) from within .vimrc, because of the order in which they're sourced. Is that accurate? Yes.

Re: Way to skip systemwide vimrc?

2011-05-12 Thread Ben Schmidt
Unfortunately, $VIM is only used for the user rc. $VIM = /usr/share/vim, but global vimrc = /etc/vimrc, despite whatever I tried to override VIM/VIMRUNTIME with. How annoying. Your Vim must be compiled with a system vimrc path hardcoded in, rather than using $VIM. Going with the alias v='vim

Re: search .vimrc and .viminfo in a different directory

2011-05-12 Thread Ben Schmidt
On 13/05/11 10:26 AM, cyboman wrote: i would like to move my .vimrc and .viminfo files in .vim directory. the reason for it is so that i could keep my .vim directory under svn. does anybody know how to tell vim to search for .viminfo and .vimrc in different directories? For vimrc, I recommend

Re: Can you override the deletion register when pasting from visual mode?

2011-05-12 Thread Ben Schmidt
Hmm. Maybe a strategy more like this would work: vnoremap expr p \ 'Esc:let g:old_unnamed_reg=getreg()CR' \ . ':let g:old_unnamed_type=getregtype()CR' \ . 'gv'.(v:register!='' ? ''.v:register : '').'p' \ . ':call setreg(,g:old_unnamed_reg,g:old_unnamed_type)CR' Hmm. I've been using visual

Re: Way to skip systemwide vimrc?

2011-05-12 Thread Ben Schmidt
call map(keys(g:), 'remove(g:, v:val)') call map(filter(range(1, bufnr('$')), 'bufexists(v:val)'), \'map(keys(getbufvar(v:val, )), '. \'remove(getbufvar(.v:val., \\), v:val))') let curtabnr=tabpagenr() for tabnr in range(1, tabpagenr('$'))

Re: Insert mode paste problems in GUI

2011-05-11 Thread Ben Schmidt
Now for some solutions: a) useC-R+ to paste: this works but lines of formatted text usually ends up being a complete mess afterwards (the indentation changes) b) useC-RC-O+ to paste: this fixes 1 but not 2, formatting is ok though c) useC-O:set pasteCRC-R+C-O:set nopasteCR this seems to fix

Re: how to remove numbers from txt files but leave them on for coding

2011-05-11 Thread Ben Schmidt
On 11/05/11 7:57 PM, woodygar wrote: Hi just stated to use vim as a python ide - how to remove numbers from .txt but leave them on for .py .pyw files Perhaps something as simple as :set number :autocmd BufNewFile,BufRead *.txt setlocal nonumber in your .vimrc That would use numbers for all

Re: error file for quick fix

2011-05-11 Thread Ben Schmidt
On 11/05/11 11:11 PM, cyboman wrote: i have the following settings in my _vimrc for make set makeef=error.err the errorfile for :make and :grep set makeprg=gmake.exe\ --win32 set errorformat=%f\(%l\)\ :\ %m,%C\ \ %p^\,%C%p~,%A\%f\\\,%l%m\,%C%m \,%Z unfortunately i'm not able to find the

Re: Can you override the deletion register when pasting from visual mode?

2011-05-11 Thread Ben Schmidt
On 5/05/11 12:23 AM, Andrew Neil wrote: On Wed, May 4, 2011 at 5:05 PM, Ben Schmidt mail_ben_schm...@yahoo.com.au wrote: On 4/05/11 11:35 PM, Andrew Neil wrote: Is there any way to prevent the default register from being clobbered when using the paste command in visual mode? By default

Re: Vim stuck in noremap mode?

2011-05-11 Thread Ben Schmidt
Every now and then, usually in a long-running Vim, Vim starts behaving a bit as if 'cp' is set, along with other oddities. Pressing Escape while editing a commandline confirms it (rather than cancelling it), pressing Tab while editing a commandline enters ^I rather than performing completion, the

Re: Insert mode paste problems in GUI

2011-05-11 Thread Ben Schmidt
In theory, yes. However, it seems Vim always mucks up the formatting when pasting. For me it almost always indents every line one extra shift width for each new line resulting in a staircase of lines. Not for me. If I have text without leading whitespace on the clipboard and paste it at an

Re: How do define a default highlight for none-linked group?

2011-05-10 Thread Ben Schmidt
The same might happen to this message. At this stage in composition, Thunderbird is showing latin1 as the encoding; if it indeed goes out like that, this message can serve as another test case. Of course, it goes without saying that Groups broke with tradition and didn't mangle that one. Maybe

  1   2   3   4   5   >