Re: line drawing inside vim [PS]

2011-10-20 Thread Tim Chase
I tried http://www.vim.org/scripts/download_script.php?src_id=8798 which is DrawIT and received mutiple errors (not necesarilly due to an error in the script?). I see Dr. Chip authored the DrawIT script. He's pretty active both in keeping his scripts up to date and participating here on the

Re: how to make 'h,j,k,l' faster ?

2011-10-28 Thread Tim Chase
On 10/27/11 22:20, gaoqiang wrote: I feel those keys slow. and word-move-keys are a little diffcult to make a accurate move. While it's a bit of a non-answer, I'd recommend using Vim's many other movement keys to move faster and more accurately. I almost NEVER use h/l to move left/right

Re: how to make 'h,j,k,l' faster ?

2011-10-28 Thread Tim Chase
On 10/28/11 10:21, Ben Fritz wrote: I find it very nice to set relative line numbers and use a count with j/k for down/up movement. I know about them head-wise, and you're right about it being easier than keying in the absolute line#, but it's a more recent feature of vim which hasn't yet

Re: how to make 'h,j,k,l' faster ?

2011-10-28 Thread Tim Chase
On 10/28/11 13:05, sc wrote: On Friday, October 28, 2011 12:23:44 Tim Chase wrote: On 10/28/11 10:21, Ben Fritz wrote: I find it very nice to set relative line numbers and use a count with j/k for down/up movement. I know about them head-wise, and you're right about it being easier than

Re: Vim search with multiple windows open

2011-10-29 Thread Tim Chase
My Vim session usually have few vertical/horizantal windows open. Often I do a search within one window and since incsearch is set, screen scrolls down to first match and is highlighted. What I am looking for is to have all occurrences/matches within other windows highlighted as I type within

Re: open file and write current date?

2011-10-30 Thread Tim Chase
On 10/27/11 18:33, Eric Maquiling wrote: Hi all, I don't recall seeing a reply to this and it's been a couple days so I'll take a rough stab at it vim + filename (will take me to end of the file) then add the current date/time (I already have iab for the current date/time from Guckes site)

Re: detect QuickFix window list or LocationList

2011-10-31 Thread Tim Chase
On 10/31/11 06:14, stardiviner wrote: I want to bind key Alt-n/p to next/previous LocationList or next/previous QuickFix list. So I need to detect which List in current buffer. then bind Alt-n/p to them. like this. if (detect Location or QuickFix) mapA-n :cnextCR mapA-n

Re: Abridged summary of vim_use@googlegroups.com - 7 Messages in 4 Topics

2011-10-31 Thread Tim Chase
On 10/31/11 03:53, Niels Grundtvig Nielsen wrote: Can't get the full answer from Tim to open this morning ... but I'd turn to grep if I wanted to search across multiple files. Not quite as convenient as se Tim Chasev...@tim.thechases.com Oct 29 10:30PM -0500 occurrences/matches

Re: How do I search for pattern A followed by NOT pattern A ?

2011-11-01 Thread Tim Chase
On 11/01/11 06:03, RJA wrote: if I have the buffer below, p 1 2 3 4 5 p 1 2 3 4 5 v 1 2 3 4 5 p 1 2 3 4 5 I can type the search /\(p\).*\n\1.* which will match against the first two lines However, I want to pick out lines 2 and 3. How can I do that ? For this

Re: function to apply multiple whole-file substitutions

2011-11-02 Thread Tim Chase
On 11/01/11 22:24, Sven Guckes wrote: * eda wizardedawiz...@telecom-digest.zzn.com [2011-11-02 04:17]: function Scrub () :%s// /g :%s/\s*$//g endfunction map :call Scrub () but it's not working, the first substitution searches for *nothing*, Just a little correction: it searches for

Re: increasing/reducing the number of leading white spaces dynamically

2011-11-03 Thread Tim Chase
On 11/03/11 10:36, Jose Caballero wrote: for our current python project, we are trying to follow the PEP recommendations, and therefore keeping all indentations to 4 white spaces. However, when I am writing code, I feel more comfortable with 8 white spaces. I am pretty sure there must be a trick

Re: increasing/reducing the number of leading white spaces dynamically

2011-11-03 Thread Tim Chase
On 11/03/11 11:40, Benjamin R. Haskell wrote: On Thu, 3 Nov 2011, Tim Chase wrote: [...] like (untested) autocmd BufWritePre *.py %s/^\( \{8}\)\+/\=substitute(submatch(0), repeat(' ', 8), repeat(' ', 4), 'g') autocmd BufWritePost *.py %s/^\( \{4}\)\+/\=substitute(submatch(0), repeat

Re: [Suggestion] New functions iskeywordchar(), isfnamechar(), isprintchar(), and isidentchar()

2011-11-03 Thread Tim Chase
On 11/03/11 13:07, Axel Bender wrote: Sometimes it's necessary to determine whether a given character belongs to one of the options whose names are reflected by the above (suggested) function names. Though it's possible to write those functions in vim itself, one would either have to call such a

Re: increasing/reducing the number of leading white spaces dynamically

2011-11-03 Thread Tim Chase
On 11/03/11 15:20, Jose Caballero wrote: that trigger on BufWritePre and BufWritePost, something like (untested) autocmd BufWritePre *.py %s/^\( \{8}\)\+/\=substitute(**submatch(0), repeat(' ', 8), repeat(' ', 4), 'g') autocmd BufWritePost *.py %s/^\( \{4}\)\+/\=substitute(submatch(0),

Re: Select Outer Block

2011-11-04 Thread Tim Chase
On 11/04/11 11:39, Paul wrote: Say I have some code like this: sub { foo { bar { baz { humbug! } } } } and I have the cursor somewhere on the humbug line. If I want to select the whole lot, to the very outer block,

Re: Using *entire screen* for buffer lines

2011-11-04 Thread Tim Chase
On 11/04/11 11:17, Elliott Cable wrote: My eventual goal here is to use every single line of the screen for lines of the active buffer; I’ve mostly acheived this, but the final sticking point is that there seems to be no way to hide/disable the last line of the screen (the “command line” or

Re: Compound search

2011-11-05 Thread Tim Chase
On 11/04/11 23:38, meino.cra...@gmx.de wrote: I do a :/work/;/holidays/ But may be I only want to find holidays which not such a huge gap after work... Is it possible to search for holidays right after work in less than a defineable distance or no holidays at all? Or is this to hard

Re: [Suggestion] New functions iskeywordchar(), isfnamechar(), isprintchar(), and isidentchar()

2011-11-06 Thread Tim Chase
On 11/06/11 13:22, Axel Bender wrote: Having obtained the current byte index using col(.), I can't simply add n to/subtract n from the return value of col(.) to find the beginning of the next/previous multi-byte character (the -1 offset is ok because there's a base bias). I could use col(.)

Re: [bug?] Abbreviation with an @

2011-11-06 Thread Tim Chase
On 11/06/11 16:51, Quincy Bowers wrote: I would like to create an abbreviation like the following: :iabbrev @author @author Author Name But when I attempt this I get the error 'E474: Invalid argument'. This works fine though: :iabbrev @ @author Author Name I was going to say you

Re: double quote in command mode

2011-11-06 Thread Tim Chase
On 11/06/11 11:02, Szymon wrote: today I found out that on my vim I cannot use double quote sign in the command mode. I would like to copy 3 lines to buffer a with command: a3yy but it doesnt work... I dont see also the sign at the bottom when I press it. But it works on my univeristy linux

Re: [bug?] Abbreviation with an @

2011-11-06 Thread Tim Chase
On 11/06/11 19:04, Quincy Bowers wrote: Ah, I wonder if abbreviations can only be defined if they don't cross keyword boundaries... And if that is the case is that intended? That's why I was confused that :iab @a @author Author Name worked, but :iab @author @author Author Name errored

Re: Abbreviation with an @

2011-11-07 Thread Tim Chase
On 11/07/11 00:26, Tony Mechelynck wrote: In the value of 'iskeyword' (whose explanation resends to 'isfname'), @ doesn't mean @, it means A-Za-z (plus maybe á, é, etc.). To make the @ character a keyword character, use @-@ Ahah! I knew I remembered something strange about this. So my

Re: search and replace (not what was searched for)

2011-11-07 Thread Tim Chase
On 11/07/11 13:07, Totte Karlsson wrote: Say I have lines looking like this [1 [2 [3 and want to add the missing ] at the end of the line. What is the command for that? Should one use search and replace or something else? It depends on whether you need to manually tweak each line or if

Re: search and replace (not what was searched for)

2011-11-07 Thread Tim Chase
On 11/07/11 13:40, Totte Karlsson wrote: :%s/\[\d\+]\@!\zs/]/g where there's an open-bracket, one or more digits and no closing brace, start replacing at the end of the match and replace with a close-bracket This one is pretty tight and should skip cases where there's already a close-bracket

Re: Abbreviation with an @

2011-11-07 Thread Tim Chase
On 11/07/11 17:14, Quincy Bowers wrote: Thanks for all of the great information everybody. I'll try adding the @ to iskeyword and see if it doesn't make anything else uncomfortable. :) The only impact of using :set isk+=@-@ should be that things that make use of words would incorporate

Re: Overlapping shortcuts

2011-11-10 Thread Tim Chase
On 11/10/2011 06:24 AM, George Papanikolaou wrote: I just found out that the Vim command to Capitalize a word is gc(w). But I have a problem, I have the tComment plugin installed, which uses the same command (gc-) to comment code Is there any way to solve this and keep both functionality?? My

Re: Overlapping shortcuts

2011-11-11 Thread Tim Chase
On 11/11/11 13:23, George Papanikolaou wrote: I understand that much, I'm just trying to figure out if it's a native-Vim thing, or an add-on. My version of Vim (stock build that comes with Debian Testing is 7.2.445, much to Tony's chagrin) doesn't have a gc command. Actually yeah, it's not

Re: moving line numbers.

2011-11-12 Thread Tim Chase
On 11/12/11 09:57, john Culleton wrote: Tryig to help a lister on another group rename a few thousand files. As the last step I need to line number a text file but then move the line number to the end of each line. In other words go from lines like 1234 mv oldfilenane newprefix to mv

Re: can I search no backwards?

2011-11-12 Thread Tim Chase
On 11/12/11 13:14, jason.桂林 wrote: I want to find next ')' and insert a comma, I use /)cri, but sometimes if there is no ) forward, it goes backward search, not what I want, can I force it search forward? You want to toggle the 'wrapscan' option: :set nowrapscan -tim -- You received

Re: How to let syn keyword accept space?

2011-11-14 Thread Tim Chase
On 11/14/11 13:09, Gary Johnson wrote: Don't forget that a keyword can only be recognized if all the characters are included in the 'iskeyword' option. If one character isn't, the keyword will never be recognized. Also is 'syn match' slower than 'syn keyword'? I don't know,

Re: Keyboard shortcut to regard the entire line as a filename, and :edit that file?

2011-11-14 Thread Tim Chase
On 11/14/11 18:47, Dun Peal wrote: I'd like to setup a keyboard shortcut that would work similar to `gf`, except it will regard the entire cursor line as the filename to open. So for example, if I'm on a line that contains the text foo bar baz., and hit the shortcut, the file foo bar baz. - a

Re: What does '* in 'exists(*GetAwkIndent)' mean?

2011-11-14 Thread Tim Chase
On 11/14/11 21:29, Peng Yu wrote: I don't know how to search for the usage of * in the following vim code. Could anybody which keyword I should search in vim help for its usage? exists(*GetAwkIndent) Reading at :help exists() mentions that the * prefix checks for the existence of a

Re: Not sign instead of space when repeating insert

2011-11-17 Thread Tim Chase
On 11/17/11 07:50, Ben Fritz wrote: On Nov 17, 3:56 am, Sergio Losillaloxim...@gmail.com wrote: A while ago, I noticed that when I use . to repeat an insert, the spaces get replaced by not signs ( ,#172;,not;). For instance, the following sequence of keystrokes: aa b cESC. produces the

Re: search for next occurence that is not commented out

2011-11-19 Thread Tim Chase
On 11/19/11 05:05, Eric Smith wrote: How do I find the next occurance of a pattern which is not preceeded in the same line by a comment token? The identity of the comment token should be derived from the current filetype. (Without rollng and mintaining my own recipes using \@! ) A couple

Re: What does '* in 'exists(*GetAwkIndent)' mean?

2011-11-19 Thread Tim Chase
On 11/18/11 23:23, Tony Mechelynck wrote: On 15/11/11 04:38, Tim Chase wrote: exists(*GetAwkIndent) Reading at :help exists() mentions that the * prefix checks for the existence of a built-in function. ...or a user-defined function. In short: of a function. I would expect GetAwkIndent

Re: search for next occurence that is not commented out

2011-11-19 Thread Tim Chase
On 11/19/11 07:32, Andy Wokula wrote: Am 19.11.2011 13:27, schrieb Tim Chase: On 11/19/11 05:05, Eric Smith wrote: How do I find the next occurance of a pattern which is not preceeded in the same line by a comment token? The identity of the comment token should be derived from the current

Re: In script always search from start of buffer

2011-11-20 Thread Tim Chase
On 11/20/11 14:58, porphyry5 wrote: In a script, how can I get repeated searches always to begin at the start of the buffer? If I precede the search with gg or :cursor(1, 1) I get E492, with 1G I get E464. :map p$ ggdd:while @ != CR:b#CR:cursor (1, 1)CR:silent! /^RCR0i$SpaceEsc:b#CRdd:endwhile

Re: In script always search from start of buffer

2011-11-21 Thread Tim Chase
On 11/21/11 05:11, Graham Lawrence wrote: On Sun, Nov 20, 2011 at 1:12 PM, Tim Chasev...@tim.thechases.com wrote: ...:b#cr:0sil! /c-r0i and just prefix the search/silent command with the line number from which you want to start (either 0 in my example, or possibly 1; difference being what

Re: How to find/delete block between matching lines?

2011-11-22 Thread Tim Chase
On 11/22/11 06:08, Jürgen Krämer wrote: I want to find blocks of text from a line matching my first regex up to a line matching my second regex. I'd like to be able to include or exclude the matching lines and I'd love to be able to execute a deletion or other command on such the found blocks.

Re: In script always search from start of buffer

2011-11-22 Thread Tim Chase
On 11/22/11 07:16, Graham Lawrence wrote: Then they are quite different, I was thinking /@ in script would be the equivalent of /^R at the command line. You can do the following in a script which, while 2 steps, I find equally clear as Tony's use of search() let @/=@ / The first line

Re: Using Vim's :help feature to find keyboard shortcuts

2011-11-22 Thread Tim Chase
On 11/22/11 12:38, Dotan Cohen wrote: On Tue, Nov 22, 2011 at 19:43, Albin Olssonalbin.ols...@gmail.com wrote: (On another note, it sounds like you are spending too much time in insert mode, remember: insert mode is just for entering text, and when you are done pressesc. The vim-way of doing

Re: Character count in current paragraph

2011-11-24 Thread Tim Chase
On 11/24/11 03:12, Ben Schmidt wrote: :echo line2byte(line('})) - line2byte(line('{)+1) I'm using the last one, as I like the linebreaks counted (at least for now) as they will be turned into spaces when the lines are joined (which is what will happen before they are pasted into a textbox with

Re: Backporting script to vim 6.3 (need help)

2011-11-24 Thread Tim Chase
On 11/24/11 02:12, Preben Randhol wrote: I have made some vimscripts for Python programming. I made them for Vim 7.0, but now I need to get them to work on Vim 6.3 as I have to work on a system where I cannot update Vim. My main problem is that I cannot figure out how I can call a function like

Re: Backporting script to vim 6.3 (need help)

2011-11-25 Thread Tim Chase
On 11/25/11 05:51, Preben Randhol wrote: Thanks I'll check it out. At the moment I have disabled my functions that calculated indentation type and size for Python files as I was using dictionaries to do that. I see I can rewrite it into using a string as you say. But not sure I need it as I will

Re: undo lust substitution made with :%s/foo/bar/gc

2011-11-25 Thread Tim Chase
On 11/25/11 15:54, denis perelyubskiy wrote: Hello, Is there a quick way to undo only the very last substitution made while performing '%s/foo/bar/gc' *while in the substitution mode*. I think I am asking whether there is something I can do at replace with le (y/n/a/q/l/^E/^Y)?' prompt to go

Re: Open a file whose name is selected after a search pattern in the current line

2011-11-25 Thread Tim Chase
On 11/25/11 09:33, Fabio Spelta wrote: Suppose I have a file that reads like sometxt1somemoretxt2abc.TEXTIWANT3.cde sometxt2somemoretxt5fgh.TEXTIWANT6.ijk and so on. I want to extract the TEXTIWANTX part and open a file named TEXTIWANTX.txt by executing a command (hitting a

Re: Open a file whose name is selected after a search pattern in the current line

2011-11-25 Thread Tim Chase
On 11/25/11 17:36, Albin Olsson wrote: On Fri, Nov 25, 2011 at 11:31 PM, Tim Chasev...@tim.thechases.com wrote: On 11/25/11 09:33, Fabio Spelta wrote: Suppose I have a file that reads like sometxt1somemoretxt2abc.TEXTIWANT3.cde sometxt2somemoretxt5fgh.TEXTIWANT6.ijk and so

Re: copy paragraphs containing

2011-11-27 Thread Tim Chase
On 11/27/11 13:38, Bee wrote: Thank you. That works but if there is more than one occurrence of / pattern/ in the paragraph, the paragraph is copied 'N' times. Is there a way to get only one copy of the paragraph? You might want to try something like :let

Re: copy paragraphs containing

2011-11-27 Thread Tim Chase
On 11/27/11 17:23, Bee wrote: :let @a=''|g/^\(\%^\|\n\)\(.\+\n\)*.*Regexp/;'}y A I tried to break out the pieces. Does the ';' mean perform another search? :let @a=''|g/^\(\%^\|\n\)\(.\+\n\)*.*foo/;'}y A \%^ Matches start of the file When matching with a string matches the

Re: expression register as calculator with floats?

2011-11-29 Thread Tim Chase
On 11/29/11 20:40, Ben Fritz wrote: Starting at Vim 7.3, this also works with floating-point math. Just as an aside, that should read Vim 7.2 as detailed at :help version-7.2 (which happens to be what I'm running on my Debian box, and floats work fine there as the OP described). -tim

Re: Split Saving

2011-12-01 Thread Tim Chase
On 12/01/11 06:20, George Papanikolaou wrote: Is there any way I can save all the splits with one command? You may be looking for either :help :mkview :h :loadview or more likely :h :mksession :h :source :h 'sessionoptions' -tim -- You received this message from the vim_use

Re: Delay on opening new file

2011-12-01 Thread Tim Chase
On 12/01/11 10:15, Alireza Haghdoost wrote: More updates about problem: vim command without mentioning any file in command line takes that much time to open. However, by pressing Ctrl+c it opens immediately... My first guess is that there's something massive stashed in your viminfo file. You

Re: If I copy multi line text to clipboard how do I know use that in vim for replace text in search/replace?

2011-12-01 Thread Tim Chase
On 12/01/11 22:11, Rick R wrote: I often will find a multi line snippet of text that I'd like to then replace in multiple files in my project after a certain block of text (maybe it's some javascript for example so I'll want the multiple lines pasted after the initialscript tag.) How do I do

Re: If I copy multi line text to clipboard how do I know use that in vim for replace text in search/replace?

2011-12-02 Thread Tim Chase
On 12/01/11 23:49, Rick R wrote: On Thu, Dec 1, 2011 at 11:20 PM, Tim Chasev...@tim.thechases.com wrote: If you have content in the clipboard you want to paste after each line, you can do :[whatever]do g/where_to_put_it/put=@* I'm still having trouble with this. I actually want it to

Re: How to give middle mouse button emulation more time?

2011-12-05 Thread Tim Chase
On 12/04/11 21:10, Paul Maier wrote: vim emulates a middle mouse button press by clicking left and right mouse button simultaneously. Works fine. But often I'm too slow to click both buttons at the very same time. I'm too slow for the default emulation tolerance. You omit whether you're

Re: Problem using :g/pattern/command

2011-12-06 Thread Tim Chase
On 12/06/11 17:13, Gary Johnson wrote: :%s/^.*[[:backspace:]]// but I'm looking for a more general solution that also fixes lines where the user has backspaced over a You might try:

Re: Careful when using ctrl+w

2011-12-09 Thread Tim Chase
On 12/09/11 18:29, Ven Tadipatri wrote: 1)Hold ctrl+w, release w, then hit the -/_ key -- the font size changes. You can undo this by doing ctrl+w, then shift and the +/= key. I think this is some terminal hotkey, not something in vi (I'm using CentOS). yes, this is a terminal-specific thing.

Re: Careful when using ctrl+w

2011-12-09 Thread Tim Chase
On 12/09/11 20:40, Ven Tadipatri wrote: Well I wasn't sure what kind of terminal I had - but you're right, it's Gnome 2.16.0. I'm pretty used to using this terminal so I don't know if I want to install/configure rxvt or xterm. I'm using CentOS so I don't know if these are available for it.

Re: Make underscore a non-word character in the current buffer

2011-12-12 Thread Tim Chase
On 12/12/11 13:30, BPJ wrote: I need to make underscore a non-word character in the current buffer, preferably without having to list all characters which should be word characters after the change. How? Sounds like you want :setlocal isk-=_ to remove _ from the 'iskeyword' settings for

Re: run shell command, launch app, but keep focus

2011-12-12 Thread Tim Chase
On 12/12/11 15:42, Alejandro Exojo wrote: El Lunes, 12 de diciembre de 2011, Chris Lott escribió: I have the following command mapped for previewing markdown as HTML: silent !pandoc -f markdown -t html -s -o %:r.html %:r.mtxt | open -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\

Re: password generator

2011-12-16 Thread Tim Chase
On 12/16/11 07:35, Steve Hall wrote: On Fri, Dec 16, 2011 at 3:36 AM, lith wrote: The best passwords include the most character possibilities. This crazy notion websites/software have of restricting them to certain characters or counts only means less security because they are more easily

Re: wqall! and closing buffers without a filename

2011-12-19 Thread Tim Chase
On 12/18/11 23:27, Chris Lott wrote: I know I can do :wqall to close all buffers and quit if all have filenames, but how can I close all buffers and quit and *discard* buffers without filenames? I think you'd have to write all that have names and then force-quit on the rest, something like

Re: nmap yiw mapping when 2 characters

2011-12-24 Thread Tim Chase
On 12/24/11 08:48, Dan S wrote: I'm trying to get a mapping to work irrespective of the number of characters in the document. The following is a simplified example which does the rather strange task of copying the current word, then pasting it and appending a question mark: :nmapbuffer F3 yiw

Re: pasting html to vim resulted in additional tags

2011-12-26 Thread Tim Chase
On 12/26/11 11:04, Peng Yu wrote: N.B. Compiled with +clipboard -X11 -xterm_clipboard What does N.B. stands for? Latin for Nota Bene, meaning note well or worth noting. -tim -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are

Re: mutt and vim playing together

2011-12-29 Thread Tim Chase
On 12/29/11 08:16, Kai Weber wrote: * Marc Webermarco-owe...@gmx.de: So everytime I edit a mail the first line and following manually inserted blank lines are highlighted. Why do you need this? Use syntax commands instead. Syntax highlighting is not what I look for. What I want to achieve

Re: mutt and vim playing together

2011-12-29 Thread Tim Chase
On 12/29/11 10:38, Dominique Pellé wrote: Tim Chase wrote: On 12/29/11 08:16, Kai Weber wrote: What I want to achieve is jumping to the first blank line where I can start typing my mail instantly. So I search for ^$ and vim jumps to the first occurrence (with the consequences I wrote in my

:view with split first?

2011-12-31 Thread Tim Chase
I regularly find myself doing the following sequence: :vnew :view some_readonly_file.txt in order to avoid the a swap-file already exists or this file is RO messages. While I know I can create a :View command to do this for me, I was wondering if there was something built-in I missed.

Re: :view with split first?

2011-12-31 Thread Tim Chase
On 12/31/11 12:43, Taylor Hedberg wrote: Unless I'm misunderstanding your question, I think you're looking for `:sview`. e.g.: :vert sv some_readonly_file.txt Precisely! I knew it had to be some combination of pieces I already knew, I just didn't try :sv I want to say I'd tried that

Bug in macro recording/playback re. shift+tab?

2012-01-03 Thread Tim Chase
Playing with a vimgolf puzzle[1], I encountered what I believe to be a bug. The top-ranked solution currently does qqYpC-Aq8@qqqC-VH$by3a Escp:%norm 0yiw$@C-ACRq8@q6GA EscZZ to solve the puzzle. Knowing that norm can be shortened one character by typing no followed by shift+tab, I tried

Re: Bug in macro recording/playback re. shift+tab?

2012-01-03 Thread Tim Chase
On 01/03/12 10:51, Karthick Gururaj wrote: On Tue, Jan 3, 2012 at 9:28 PM, Tim Chase wrote qqYpC-Aq8@qqqC-VH$by3aEscp:%norm 0yiw$@C-ACRq8@q6GAEscZZ to solve the puzzle. Knowing that norm can be shortened one character by typing no followed by shift+tab, I tried making the change

Re: undoing iab expansion

2012-01-04 Thread Tim Chase
On 01/04/12 06:06, sinbad wrote: i use abbreviations to do autocomplete a big sentence. sometimes the abr' will be inappropriate, so i want a quick way to revert back to what i have originally typed. i know u doesn't work. is there anyother way ? My first thought would be to use a mapping that

Re: running commands with !

2012-01-08 Thread Tim Chase
On 01/08/12 06:19, eNG1Ne wrote: I have three different machines with a score-writing package on, and on two of the three I can run the compile equivalent to create PostScript output with !mup -F % On the third, I hit the following snag: !mup {fname} reports /bin/bash: mup: command not found

Re: syntax file for column-fixed language (LSDYNA)

2012-01-08 Thread Tim Chase
On 01/08/12 08:43, Edwin Miller wrote: /\s*[1-9][0-9]*\s*/ but how to tell vim that this regex should only match e.g column 2? It sounds like you might want the \%c or \%v tokens, something like /\%10c\s*[1-9]\d*\s*\%20c/ The difference between the v and c versions regard how they treat

Re: 'noau' for normal mode?

2012-01-09 Thread Tim Chase
On 01/09/12 08:49, narke wrote: Thanks for the tip. It could be solution. And, how do I set the event back, I mean disable the effects of 'set ei'? Thanks. Usually you'd save it in a germane variable (whether global, buffer-local, script-local, etc), do your thing, then restore it:

Re: 'noau' for normal mode?

2012-01-09 Thread Tim Chase
On 01/09/12 09:42, narke wrote: I found ':letei=' or ':let ei=...' both work. Is there any different between them? Just be curious. The ei accesses the setting. Without the , it's just an arbitrarily (and possibly misleadingly) named variable. BTW: in order to run aleadervv

Re: Request for feature upgrade/enhancement.....

2012-01-11 Thread Tim Chase
On 01/11/12 19:38, Marc Weber wrote: 2) find a fast way to prefix each line with its own line position as % value? Thus if you have 4 lines it should be: 0 % 50 % 100 % In those cases I tend to write a stupid .vim file and source it: fun! Prefix() let max = line('$') for i in

Re: Sophisticated navigation system

2012-01-12 Thread Tim Chase
On 01/12/12 13:02, Ven Tadipatri wrote: So I tried the ctrl+f. To my surprise, it moved forward a screen, it neatly positioned the cursor *above* the line I was just on. So I can move forward one screen *AND* see the context of the code, in other words what was on the line before. Ctrl+b

Re: vimdiff: ignore linebreaks

2012-01-12 Thread Tim Chase
For example, the following two paragraphs should be considered as the same, as the TeX output would be exactly the same: ~~~ The quick brown fox jumps over the lazy dog. ~~~ The quick brown fox jumps over the lazy

Re: Bug: After turning off 'Z'' (cpoptions-=Z') in my .vimrc, vim turns it back on in the gui version in menu.vim.

2012-01-12 Thread Tim Chase
On 01/12/12 21:55, Marc Weber wrote: Why do you write readonly files at all? What is your use case? Just from my use-cases, on Win32 I all-too-often end up doing the following: 1) open a CSV file in Excel 2) open the same CSV file in Vim (comes up RO) 3) make some changes in Vim 4)

Re: vimdiff: ignore linebreaks

2012-01-13 Thread Tim Chase
On 01/13/12 11:18, Claus Atzenbeck wrote: Interestingly, it seems that word wise diffs are not that much needed/wanted for Vim. They are! I used latexdiff in the past. Nice, but not what I want now. I want to use a version control system to ease collaborative working on (LaTeX) documents in

Re: Sophisticated navigation system

2012-01-13 Thread Tim Chase
On 01/13/12 14:27, Ven Tadipatri wrote: On Thu, Jan 12, 2012 at 2:08 PM, Tim Chasev...@tim.thechases.com wrote: :help 'scrolloff' Does scrolloff work with only jumping forward (ctrl + f) or does it also work with jumping back? (ctrl+b) It works with all jumps (searching

Re: ignore new line in search

2012-01-15 Thread Tim Chase
On 01/15/12 05:41, Pau wrote: I very frequently have to look for a couple of words in a huge document to find the place where I have to resume work or do modifications. Unfortunately, the search function stops in a new line, so that if I look for a very interesting place which was far away vim

Re: vimdiff: ignore linebreaks

2012-01-15 Thread Tim Chase
On 01/15/12 08:03, Bram Moolenaar wrote: Claus Atzenbeck wrote: Am 13.01.2012 um 15:46 schrieb Taylor Hedberg: I'm not sure you can. According to `:help diff-diffexpr`, Vim requires the output of the diff program to be an ed-style diff, which is fundamentally linewise. Maybe you could come

Re: ignore new line in search

2012-01-15 Thread Tim Chase
On 01/15/12 13:49, Steve Litt wrote: On Sunday, January 15, 2012 10:39:42 AM Pau wrote: thanks a lot... but I forgot to mention that one main problem is that I cannot know in advance where the new line is... isn't there a faster way of telling vim to ingore new lines? thanks a lot! Yes. I

Re: What did I do?

2012-01-16 Thread Tim Chase
On 01/16/12 08:54, Eric Weir wrote: This morning, working in a large text document, I realized that all of a sudden all the upper case characters had been converted to lowercase. It seems I accidentally issued a command that has that effect. I believe at the time I had caps-lock on, had

Re: What did I do?

2012-01-16 Thread Tim Chase
On 01/16/12 12:04, Eric Weir wrote: On Jan 16, 2012, at 10:05 AM, Tim Chase wrote: Sounds like you used gumotion. Alternatively, if you were in visual mode, you may have hit u to force the case change. :h gu :h gU :h v_u :h v_U :h v_~ Thanks, Tim--and to everyone else who

Re: What did I do?

2012-01-16 Thread Tim Chase
On 01/16/12 17:36, Eric Weir wrote: Still not quite clear about the concept of flowing and reflowed text. The way Tim put it makes it sound like all paragraphs, not just each paragraph, on one line. I'm not sure what I have. I have vim set to wrap lines at the screen, but I don't think there's

Re: specifying multiple ranges in vim

2012-01-17 Thread Tim Chase
On 01/17/12 08:17, rail shafigulin wrote: does anybody know if it is possible to specify multiple ranges in vim for a command execution for example: :1,4s/old/new/g - this command will replace old to new in lines 1 to 4 inclusive however what if i want to execute this command in multiple places

Re: konsole problem about :split command

2012-01-17 Thread Tim Chase
On 01/17/12 00:14, 李鹏 wrote: Hi, All I encountered a problem of vim under konsole. After using the command :split in vim and open a new window, but its does work to use the mouse pointer to resize the split window. Only Ctrl - w +/- does work. But under gnome-terminal it's ok. Any of you

Re: Retrieve the argument of a prior Ex mode command

2012-01-17 Thread Tim Chase
On 01/17/12 20:04, Chris Jones wrote: At the bash prompt, I often use the [Alt+.]¹ keyboard action to retrieve the argument of a prior command from the bash history list. To illustrate: | $ mkdir -p long/directory/name/I/would/rather/not/type/again | $ cd [Alt+.] Bash expands the [Alt+.]

Re: Retrieve the argument of a prior Ex mode command (back on-list)

2012-01-18 Thread Tim Chase
[Bringing back on-list, as others might have better suggestions for my mapping/function down further] On 01/18/12 14:27, Chris Jones wrote: Note that, there are two separate factors here: speed within the limited context of a bash session and _overall_ speed when you are switching back and

Re: Retrieve the argument of a prior Ex mode command

2012-01-19 Thread Tim Chase
On 01/19/12 21:24, Chris Jones wrote: On Wed, Jan 18, 2012 at 08:42:51PM EST, Tim Chase wrote: let item = histget(getcmdtype(), -1) Incidentally, I rather like the ‘cnoremapexpr...’ syntax and I need to evaluate it against the ‘cnoremap C-\eMyFunc()CR’ form. In my case they do

Re: How does S-CR work in gvim?

2012-01-20 Thread Tim Chase
On 01/20/12 17:31, Gary Johnson wrote: Someone just posted a question to superuser in which they mentioned discovering that Shift-Enter is the same as Ctrl-F. I experimented a little and discovered that that's true, but only in gvim, not vim, and it's not documented anywhere that I could find,

Re: Shift column right by spaces?

2012-01-21 Thread Tim Chase
On 01/21/12 11:01, sc wrote: On Sat, Jan 21, 2012 at 07:54:12AM -0900, Tim Johnson wrote: I'm using MacVim 7.3 on OSX 10.7 (Lion) As well as (g)vim 7.~ on ubuntu. I would like to be able to move a column right by an arbitrary numbers of spaces, regardless of the value of `shiftwidth'. Is

Re: Prefix lines with a counter

2012-01-21 Thread Tim Chase
On 01/21/12 10:49, Chris Lott wrote: Start with a list of items delineated by line breaks: foo bar baz And turn it into a markdown numbered list: 1. foo 2. bar 3. baz I know that I *could* use 1. for every item, since that's easy enough to do and Markdown knows what to do when rendering, but

Re: Retrieve the argument of a prior Ex mode command (back on-list)

2012-01-23 Thread Tim Chase
On 01/23/12 14:57, Chris Jones wrote: On Wed, Jan 18, 2012 at 08:42:51PM EST, Tim Chase wrote: = let item = histget(getcmdtype(), -1) = Unless I missed something, I don't think this is going

Re: Retrieve the argument of a prior Ex mode command (back on-list)

2012-01-23 Thread Tim Chase
On 01/23/12 15:46, Chris Jones wrote: On Mon, Jan 23, 2012 at 04:24:52PM EST, Tim Chase wrote: On 01/23/12 14:57, Chris Jones wrote: On Wed, Jan 18, 2012 at 08:42:51PM EST, Tim Chase wrote: = let item = histget(getcmdtype(), -1

Re: Open file and position cursor at column number?

2012-01-23 Thread Tim Chase
On 01/23/12 06:45, Trevor Bača wrote: How can I open a file and have the cursor automatically positioned at column number n? Something like ... vim +024l foo.txt ... but where 024l would be interpreted as a normal command instead of an ex command. You can use the -c command combined

Re: Simple substitution question

2012-01-24 Thread Tim Chase
On 01/24/12 07:02, Guido Van Hoecke wrote: gi..Same as i, but leave the cursor on the NERDTree.. s...Open selected file in a new vsplit... I know that :','s/\.\+$// would remove all trailing dots. But why does :','s/\./ /g only change the first set of '.' of

Re: Redhat Linux has crippled Vim

2012-01-29 Thread Tim Chase
Any ideas why Redhat wants to convert vim back to the limitations of the old vi? I know several distributions install vim-tiny (or its minimal counterpart) as a way to pack as much power as possible in as little disk space as possible. Consider dedicated routers and old machines where disk

<    1   2   3   4   5   6   7   8   9   10   >