Re: Open all folds in the current fold?

2007-06-04 Thread Andy Wokula
Tim Chase schrieb: I'm trying to find/create a command that acts somewhat like zO/zR for within an existing fold. If I use zR, it opens all the folds in the whole document. If I use zO, it opens all the folds under the cursor. The behavior I'm looking for is that if I'm within an existing

Re: Defining new visual-mode motions?

2007-06-02 Thread Andy Wokula
Yegappan Lakshmanan schrieb: Hi, On 6/2/07, Andy Wokula [EMAIL PROTECTED] wrote: Within a function (or script or Ex-mode), the visual area is not turned off between ex commands, because there is no actual mode switching ... IMHO. I don't know if this is mentioned in the help. According

Re: copying text char-by-char from the line above line..

2007-05-31 Thread Andy Wokula
Ajay Gupta schrieb: Hi All, I saw one of my friends (once!) copying the text from the line right above. He was using some keycombo and it would appear like he was copying the characters one-by-one. So, if there are two lines like quick brown fox I see and on the 2nd line, after 'see', i

Crash with strftime()

2007-05-23 Thread Andy Wokula
Not nice: :echo strftime(%e) %e - some undefined code I used by accident makes Vim crash. (GVim 7.0.235, Win32) -- Regards, Andy

Re: Crash with strftime()

2007-05-23 Thread Andy Wokula
to have look at the crash from a debugger. -- Anatoli Sakhnik. On 23/05/07, Andy Wokula [EMAIL PROTECTED] wrote: Not nice: :echo strftime(%e) %e - some undefined code I used by accident makes Vim crash. (GVim 7.0.235, Win32) -- Regards, Andy Also no crash with the original GVim 7.0 Win32

Re: A performance question

2007-05-22 Thread Andy Wokula
A.J.Mechelynck schrieb: Robert M Robinson wrote: First, thanks very much for creating VIM! I have been using it on Linux systems for years, and now use it via cygwin at home as well. I vastly prefer VIM to EMACS, especially at home. I learned vi on a VAX/VMS system long ago (a friend of

Re: Wish: col(^)

2007-05-21 Thread Andy Wokula
Andy Wokula schrieb: Gary Johnson schrieb: On 2007-05-21, Andy Wokula [EMAIL PROTECTED] wrote: ... get position of first non-blank character in the line. If there is col($), there should also be col(^). In some situations (e.g. :imap expr) :normal ^ is not allowed. indent(.)? HTH

Re: Wish: col(^)

2007-05-21 Thread Andy Wokula
Nikolai Weibull schrieb: On 5/21/07, Andy Wokula [EMAIL PROTECTED] wrote: ... get position of first non-blank character in the line. If there is col($), there should also be col(^). In some situations (e.g. :imap expr) :normal ^ is not allowed. Then shouldn't there also be a col(0

Re: Go to start of visual selection

2007-05-16 Thread Andy Wokula
Andy Wokula schrieb: Tim Chase schrieb: How can I move the cursor the start of the visual selection? With the o command, yes. But how can I make sure the cursor is at the start while visual mode is on? The ` motion followed by gv sets the cursor back to the end if it was there. I think

Re: vim 7.1 and cr/lf interpretation

2007-05-14 Thread Andy Wokula
Thomas Michael Engelke schrieb: :set fileformats? gives fileformats=dos,unix, so both formats are available, yet the detection and switching does not seem to work. Are you sure _every_ line ends in ^M? -- Regards, Andy EOM

Re: comments after brackets with vim?

2007-05-14 Thread Andy Wokula
, filetype skill is what you currently use for those kind of files. -- Regards, Andy EOM Vim filetype plugin code snippet Language: skill (cadence extension language) File: skill_comment.vim Date: 2007 Mai 14 Author: Andy Wokula [EMAIL PROTECTED] Description: After inserting

Re: Vim and email quoting

2007-05-11 Thread Andy Wokula
Timothy Knox schrieb: I use vim to write my outgoing email, and for the most part, it rocks. Thanks to all the folks who have written modules and provided tips that make it the best thing for writing email since mailx grin. That said, there is one small annoyance I find: When replying to an

Re: autocomplete on the command line from words in buffers

2007-05-07 Thread Andy Wokula
Larson, David schrieb: Hello Dan, I suggest wrapping these functions into vim commands and then leverage the command completion feature. See: :help :command-completion HTH, David -Original Message- From: Dan Fabrizio [mailto:[EMAIL PROTECTED] Sent: Monday, May 07, 2007 5:27 AM To:

Bug: windo and exceptions

2007-05-02 Thread Andy Wokula
GVim runs into an endless loop if I do the following: clean startup :new at least two windows :windo throw foo Error detected while processing : E605: Exception not caught: foo E605: Exception not caught: foo E605: Exception not caught: foo E605:

Re: Bug: windo and exceptions

2007-05-02 Thread Andy Wokula
Bram Moolenaar schrieb: Andy Wokula wrote: GVim runs into an endless loop if I do the following: clean startup :new at least two windows :windo throw foo Error detected while processing : E605: Exception not caught: foo E605: Exception not caught

Re: Avoiding German Umlauts....

2007-04-27 Thread Andy Wokula
A.J.Mechelynck schrieb: [EMAIL PROTECTED] wrote: Hi, I want to write a macro, function or what else, which ensures, that no german umlauts (äöüÄÖÜ) or the sz (ß) will ever occure in any file written with vim. It does not matter, if these charactes will appear while typing but they should

Re: Avoiding German Umlauts....

2007-04-27 Thread Andy Wokula
A.J.Mechelynck schrieb: Andy Wokula wrote: A.J.Mechelynck schrieb: [...] Note that the official transliteration of the eszett is not sz but ss: upcase(ß) is SS and, in de_CH locales, the eszett is not used (other than for archaic look, sometimes together with a Fraktur font); ss is used

Re: wish: allow a: in the function def

2007-04-24 Thread Andy Wokula
Thomas schrieb: Yakov Lerner schrieb: wish: allow a: in the function definition line: function foo(a:line1, a:line2) yeah, occasionally I do :setl isk+=: to get completion of variable names in vim scripts. I'd like to have this for function arguments, too. Counterwish: implement

Re: wish: allow a: in the function def

2007-04-24 Thread Andy Wokula
Nikolai Weibull schrieb: On 4/24/07, Andy Wokula [EMAIL PROTECTED] wrote: Thomas schrieb: So maybe one could make vimscript search a variable foo as l:foo, a:foo, (maybe also: w:foo, b:foo), s:foo, g:foo, and then throw an undefined variable name error if none exists. Or so. Don't

Re: strange commenting behaviour (text gets deleted)

2007-04-18 Thread Andy Wokula
Daniel Nogradi schrieb: Hi vimmers, I have a very strange problem and couldn't figure out what's going on. I use the following function for commenting out a line or a block of lines: function! Komment2(commentLeader, commentTrailer) if match( getline(.), ^\ *$ ) 0 let

Re: strange commenting behaviour (text gets deleted)

2007-04-18 Thread Andy Wokula
Andy Wokula schrieb: Daniel Nogradi schrieb: [...] This function is a modified version of something I found in one of the tips or scripts of the vim website. For C I use of course Komment2('/* ', ' */') and this works perfectly well, I can select a block of lines, call the above function

Re: how to avoid deleting the auto-indent in a new empty line when i press Esc

2007-04-17 Thread Andy Wokula
Gary Johnson schrieb: On 2007-04-16, fREW [EMAIL PROTECTED] wrote: On 4/16/07, Tom Whittock [EMAIL PROTECTED] wrote: What I need is to always keep the auto-indented spaces. So next time I can start to insert from the spaced cursor. Alternatively use cc to edit the ostensibly blank line.

Re: strange commenting behaviour (text gets deleted)

2007-04-17 Thread Andy Wokula
Daniel Nogradi schrieb: Hi vimmers, I have a very strange problem and couldn't figure out what's going on. I use the following function for commenting out a line or a block of lines: function! Komment2(commentLeader, commentTrailer) if match( getline(.), ^\ *$ ) 0 let save_cpo =

Re: Troubles configuring vim (multi-questions)

2007-04-14 Thread Andy Wokula
OnionKnight schrieb: I think I understand the difference now and my function is pretty neat now. function! HomeKey () let c = col(.) if c == 1 normal ^ else normal ^ if col(.) = c normal 0

Re: case of very slow regex search

2007-04-03 Thread Andy Wokula
Yakov Lerner schrieb: I use sometimes the regex that finds paragraphs containing given words w1,w2,... in any order ( I define paragraph as separated by lines, \n\n). I use the pattern like this: (two-word example, w1 and w2, but easily expandable for N words):

Re: Question about b:did_ftplugin

2007-04-02 Thread Andy Wokula
Thomas schrieb: Hi, When I set a filetype for a buffer the variable b:did_ftplugin is set. The help says: If you are writing a filetype plugin to be used by many people, they need a chance to disable loading it. Put this at the top of the plugin: Only do this when not done yet for

Re: Vim Help for deleting alternate lines in text

2007-03-31 Thread Andy Wokula
Gary Johnson schrieb: Auro Ashish Saha wrote: Hello, Please help me to remove alternate lines from a text file. 00 0 123456 9 99 9 123445 9 I want to delete the line 1, 3, 5 and so on. What are the commands to be used. Thanks for help in advance. Method I:

Re: Selecting tag opens file in a new tab - how?

2007-03-23 Thread Andy Wokula
A.J.Mechelynck schrieb: Zarko Coklin wrote: I posted following question some time back: ~ Is it possible to have a setup in .vimrc so that every time I select tag either through CTRL-] or by holding CTRL and pressing left mouse click to open a new buffer in a new

Re: Count characters

2007-03-22 Thread Andy Wokula
Tim Chase schrieb: Is there some function or script to count characters (letters without whitespaces) in vim? For example Kile the Latex Editor has such a feature to control how long texts are. You can use :%s/\w//g which will report back X substitutions on Y lines. X represents the

Re: Vim Help for deleting text

2007-03-20 Thread Andy Wokula
Arnaud Bourree schrieb: Arnaud Bourree wrote on 20/03/2007 10:22: Tim Chase wrote on 19/03/2007 23:01: Or, if all your columns align, you can use visual-block mode with control+V to create a block across the characters in question, and then just hit d to delete. -tim Sorry, I'm begginer

Re: Get date and filename as plain text

2007-03-15 Thread Andy Wokula
Wolfgang Schmidt schrieb: Hi, I don't know about the filename part, but you could insert a date with the following mapping: inoremap @date C-R=strftime(%d.%m.%Y)CR Cheers, Wolfgang Eric Leenman wrote: Hi, Is it possible to make an inoremap that inserts the date as text and the

Re: clone a vim session into a new tab

2007-03-13 Thread Andy Wokula
Kamaraju S Kusumanchi schrieb: Let's say I opened a 6 files in a 3X2 grid inside vim. Now I want to clone this and have all the files at the same position, same window sizes etc., and put it into a new tab under the same vim session. Is there a command to do this? commands like tabe etc., open

Re: clone a vim session into a new tab

2007-03-13 Thread Andy Wokula
Kamaraju S Kusumanchi schrieb: Andy Wokula wrote: Simple way (recommended or not, at least quick) with sessions: :mks use ! to overwrite existing Session.vim :tabnew :so Session.vim Just guessed it might work and it works. Now I think sessions don't include tabpages. This works although I

Re: clone a vim session into a new tab

2007-03-13 Thread Andy Wokula
Kamaraju S Kusumanchi schrieb: Andy Wokula wrote: Ok tabpages are included in the session per default. Try :set sessionoptions-=tabpages first. Awesome! Thanks a lot! :help 'sessionoptions' The help is a bit confusing. It says There is no option to include tab pages yet, only

Re: visual problem

2007-03-12 Thread Andy Wokula
Simon Jackson schrieb: I have a problem when i am in visual mode and i have text highlighted. Instead of being able to run a command, it just overwrites my selected text instead. im sure its because of something in my vimrc but i just cant pinpoint it, can anyone help? P.S.: If anyone sees some

Re: How to paste without replace the content in buffer

2007-03-11 Thread Andy Wokula
Peng Yu schrieb: Hi, Suppose I want to replace string1 with string2 in a file from vim. 1. Highlight string1 (in visual mode) and then type y. 2. Highlight string2 (in visual mode) and then type p. However, the problem with the above procedure is that string2, instead of string1, is in

Re: Marking an undo-block before ^U in insert-mode

2007-02-23 Thread Andy Wokula
Yakov Lerner schrieb: On 2/20/07, Tim Chase [EMAIL PROTECTED] wrote: I'm trying to find a good way to remap control+U in insert-mode so that it begins an undo-block. There are times when type control+U in insert-mode and it doesn't do what I intend, or I want to undo it, only to find that an

Re: Marking an undo-block before ^U in insert-mode

2007-02-23 Thread Andy Wokula
A.J.Mechelynck schrieb: Andy Wokula wrote: There is another strange detail about c-gu In my vimrc I have (for gVim 6.4, gVim 7.0) :imap cr crc-gu Each u goes back one line of text in the undo history. Note the imap instead of inoremap. This way abbreviations still work. For the strange

Re: Insert new blank line in normal mode

2007-02-23 Thread Andy Wokula
A.J.Mechelynck schrieb: Alexey Vakhov wrote: Hi Dear community, Command o and O create new line and switch to insert mode. I want only insert blank line and stay in normal mode. I know this problem can be solved using simple mappting, but maybe in vim there are original commands for this tip?

Re: break option lines

2007-02-06 Thread Andy Wokula
[EMAIL PROTECTED] schrieb: Hello, is it possible in a vimrc for comma separated option strings like this one below to break: set dictionary=$VIM\SQLDict\BPMS_Stamm.txt,$VIM\SQLDict\BPMS_Mandant.txt,$VIM\SQL Dict\CBS_2005.txt,$VIM\SQLDict\ICCS_Net_Strommixer.txt,$VIM\SQLDict\DBS.txt,$

Re: Tips which are spam

2007-02-05 Thread Andy Wokula
Currently there is much spam in recent comments: http://vim.sourceforge.net/tips/recent_notes.php Andy -- EOF ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

Re: Tips which are spam

2007-02-05 Thread Andy Wokula
John Beckett schrieb: Andy Wokula wrote: Currently there is much spam in recent comments: http://vim.sourceforge.net/tips/recent_notes.php Last time this was discussed I got the impression that there is a feeling that if no one reads the spam, then it is not a problem. But I think

Re: Go to start of visual selection

2007-02-04 Thread Andy Wokula
Tim Chase schrieb: How can I move the cursor the start of the visual selection? With the o command, yes. But how can I make sure the cursor is at the start while visual mode is on? The ` motion followed by gv sets the cursor back to the end if it was there. I think it sounds like you want

Re: Go to start of visual selection

2007-02-04 Thread Andy Wokula
Tim Chase schrieb: How can I move the cursor the start of the visual selection? With the o command, yes. But how can I make sure the cursor is at the start while visual mode is on? The ` motion followed by gv sets the cursor back to the end if it was there. I think it sounds like you want

Go to start of visual selection

2007-02-01 Thread Andy Wokula
How can I move the cursor the start of the visual selection? With the o command, yes. But how can I make sure the cursor is at the start while visual mode is on? The ` motion followed by gv sets the cursor back to the end if it was there. Thx, Andy -- EOF

Re: change filenames before vim reads buffer

2007-01-25 Thread Andy Wokula
Tom Whittock schrieb: Hi. I'm running the vim under cygwin, and have set up my build process to execute via :make. This is great, but the build process reports filenames in DOS format, not the cygwin /cygdrive/* way. This means that when a quickfix command runs, vim will be asked to open

Re: A doubt with syntax region

2007-01-25 Thread Andy Wokula
DervishD schrieb: Hi all :)) I'm trying to fully understand the syntax commands, and when doing tests a question popped up in my mind: let's say I have a region which starts with something like \I\i*{ and ends with }. For example, the example below will match: strange{contents}

Re: how to NOT save history

2007-01-16 Thread Andy Wokula
Luis A. Florit schrieb: Pals, How I avoid certain commands and/or substitutions NOT to be saved into the history list? For example, I have a sequence of VIM commands that executes on every email quote to properly format it, and I don't want these to appear in the registries and history.

Re: how to NOT save history

2007-01-16 Thread Andy Wokula
Luis A. Florit schrieb: Pals, How I avoid certain commands and/or substitutions NOT to be saved into the history list? For example, I have a sequence of VIM commands that executes on every email quote to properly format it, and I don't want these to appear in the registries and history.

Re: C++ Syntax highlighting for Identifier, Statement

2007-01-14 Thread Andy Wokula
Matt England schrieb: I'm trying to get function names, class names, objects, variables and similar things to appear as non-white text with 'syntax on'. Had the same question after editing with Visual Studio. This is difficult, I haven't seen that before in any syntax file. I think there are

Re: enclosing a visual block with quotes

2007-01-14 Thread Andy Wokula
Bram Kuijper schrieb: Hi, I tried to use the following tip on enclosing a visual block with quotes in vim: http://schlitt.info/applications/blog/index.php?/archives/331-Comfortable-PHP-editing-with-VIM-3.html Sometimes you want to include text you already typed text into braces or (more

Undo bug

2007-01-06 Thread Andy Wokula
Think I found a bug in the undo-branches behaviour, which cuts undo-states. Try this out: In a new buffer, insert `one' (or some other text), then in normal mode type `g-g-u', now insert `two' and type `g-g-u' again (ignore quotes `'). From now on it is not possible to get back the text states

Re: locked window

2006-10-19 Thread Andy Wokula
Brecht Machiels schrieb: Hi, You can clear the 'modifiable' option to disable unintended modifications to a buffer. setlocal nomodifiable Is is possible to prevent, for example, the project plugin from opening another file (other than the current) in a window? The nomodifiable option

Re: combining two mapping into one

2006-10-08 Thread Andy Wokula
A.J.Mechelynck schrieb: Kamaraju Kusumanchi wrote: On Friday 06 October 2006 08:24, Andy Wokula wrote: Kamaraju Kusumanchi schrieb: I use two mappings for my Fortran (.f90) files map F5 Homev%zf map F6 HomezDv%zf The idea is to create folds for code blocks which are of the form

Re: combining two mapping into one

2006-10-06 Thread Andy Wokula
Kamaraju Kusumanchi schrieb: I use two mappings for my Fortran (.f90) files map F5 Homev%zf map F6 HomezDv%zf The idea is to create folds for code blocks which are of the form subroutine some_name_here statements_here end subroutine some_name_here Here F5 folds the subroutine

Re: Mapping of keysequences...

2006-10-02 Thread Andy Wokula
Meino Christian Cramer schrieb: Thanks for all, Tony!!! :O) I think Bram should add :he Tony -support in vim which prints your email address... or may be it is not what you really want, isn't ir ;O) (just kidding) Keep hacking! mcc Add it yourself :e ~/.vim/doc/tony.txt

Re: glued Cursor trick anyone ?

2006-09-21 Thread Andy Wokula
Tim Chase schrieb: Generally, folks would get fired for writing stunts like the following, so read with caution... Archived here: http://permalink.gmane.org/gmane.editors.vim/38930 you'll find these two lines from my post: nnoremap / :exec('cnoremap '.'cr '.'cr:exec(cunmap

Re: Two problems

2006-09-14 Thread Andy Wokula
Pete Johns schrieb: For all lines longer than 72 characters, reformat the paragraph from that line.. 1,$g/.\{73,}/normal v}gq or just :set tw=72 if set otherwise :g/./normal gqq Andy

Re: Deleting question

2006-09-13 Thread Andy Wokula
Nikolaos A. Patsopoulos schrieb: Hi, I'm trying to delete several lines from the beginning of file till the appearance of a specific pattern, without deleting the pattern. I have used the following command: :1,/Citations: /d/e-10 but the offset doesn't work. Thanks in advance,

Re: Deleting question

2006-09-13 Thread Andy Wokula
why not :1;/Citations: /-1d of course, this is linewise, what's before Citations: in the same line is not deleted. Andy oops, just overlooked Yakov's answer, sorry. Andy ___ Telefonate ohne weitere Kosten vom

Re: Smarter Indent (an odd problem)

2006-09-06 Thread Andy Wokula
Let me take this opportunity to try once again to drum up support for an idea that I have proposed before. IMO it is too restrictive to make options (such as syntax highlighting, 'textwidth', and indent-related options) apply to a whole file. There should be a convenient, consistent

Re: Remapping - how to get the count

2006-07-12 Thread Andy Wokula
Yakov Lerner schrieb: On 7/8/06, Andy Wokula [EMAIL PROTECTED] wrote: I want to remap Ctrl-A (normal mode) to do something similar with other data, e.g. :nmap c-a ciwc-r=IncRoman(@-)cresc Now if a count is provided this will mess up the text, e.g. 10c-a does 10ciw... What is a good way

Re: language menu

2006-07-12 Thread Andy Wokula
Cesar Romani schrieb: Normally the language of my vim's menu is Italian. How can I change it to English? Many thanks in advance, Cesar :set langmenu=none works for me. Put it early in your .vimrc, :help 'langmenu' says: This option must be set before loading menus, switching on filetype

Remapping - how to get the count

2006-07-08 Thread Andy Wokula
I want to remap Ctrl-A (normal mode) to do something similar with other data, e.g. :nmap c-a ciwc-r=IncRoman(@-)cresc Now if a count is provided this will mess up the text, e.g. 10c-a does 10ciw... What is a good way to catch the count and make it available to the function call? TIA Andy