Re: How to change linenumber format on mode changed?

2012-03-12 Thread Tim Chase
On 03/12/12 01:30, Hanfei Shen wrote: I want to set normalnumber in normal mode and insert mode, relativenumber in visual mode. Is there a way to do that? Untested, my guess would be something like :autocmd InsertEnter * :set nonumber relativenumber :autocmd InsertLeave * :set

Re: Using i to go back and insert

2012-03-12 Thread Tim Chase
On 03/12/12 08:16, Dotan Cohen wrote: On Mon, Mar 12, 2012 at 14:18, Tim Chasev...@tim.thechases.com wrote: While an odd request, is there something I'm missing about just doing :nnoremap ii hi And of course, by this I mean nnoremap ii h :-) I have no problem waiting for the limeoutlen

Re: How does the non matching stuff work

2012-03-11 Thread Tim Chase
On 03/11/12 12:47, Martin Krischik wrote: I mastered most of regular expressions. Only with the “non matching stuff” I still have my problems. Say want to find all lines containing Level.FINE — but not those who have been commented out. First idea would be: /\C\v(\/\/)@!.{-}Level\.FINE.{0,2}/

Re: Some keys not easily available for :map or :imap

2012-03-11 Thread Tim Chase
On 03/11/12 19:31, Kevin O'Gorman wrote: I'm running under gnome 2 on Ubuntu Linux 11.04. Are you running gvim or vim, and if (non-g)vim, which terminal are you using? Gnome-terminal, xterm, rxvt, or some other? I know some of the terminal programs intercept certain key-codes. -tim --

Re: Curly brace expansion oddity (was How to clear number registers)

2012-03-10 Thread Tim Chase
On 03/07/12 08:18, Christian Brabandt wrote: On Wed, March 7, 2012 13:03, Bram Moolenaar wrote: Christian Brabandt wrote: On So, 04 Mär 2012, Tim Chase wrote: :let i=3 :let @{i}='' :echo @{i} Attached patch fixes it Well, it supports the curly-braces notation in a two more places

Re: substitute problem

2012-03-09 Thread Tim Chase
On 03/09/12 10:45, Cesar Romani wrote: How can I convert this: Vaya con Dios to: [VAYA CON DIOS](#vaya-con-dios) Just this particular case, or do you have other text that needs to be found? :%s/.*/\='['.toupper(submatch(0)).']#'.substitute(tolower(submatch(0)), ' ', '-', 'g') Does it

Re: substitute problem

2012-03-09 Thread Tim Chase
On 03/09/12 11:40, Tim Chase wrote: On 03/09/12 10:45, Cesar Romani wrote: How can I convert this: Vaya con Dios to: [VAYA CON DIOS](#vaya-con-dios) Just this particular case, or do you have other text that needs to be found? :%s/.*/\='['.toupper(submatch(0)).']#'.substitute(tolower

Re: substitute problem

2012-03-09 Thread Tim Chase
On 03/09/12 13:11, Cesar Romani wrote: On 09/03/2012 12:43 p.m., Tim Chase wrote: %s/.*/\='['.toupper(submatch(0)).'](#'.substitute(tolower(submatch(0)), ' ', '-', 'g').')' -tim Thanks a lot, it works fine, but if I use it under :execute and try to convert: Véase Vaya con Dios

Re: substitute problem

2012-03-09 Thread Tim Chase
On 03/09/12 14:03, Cesar Romani wrote: On 09/03/2012 02:34 p.m., Tim Chase wrote: Is there any reason you're trying to do it with an :exec rather than just calling it directly? Because I'm using it inside a function That doesn't preclude you from using the straight :s form

Re: How to delete regions between lines

2012-03-09 Thread Tim Chase
On 03/09/12 18:36, Yue Wu wrote: Hi, list, I want to delete all regions between line '#begin' and line '#end' in a buffer, for example, a buffer: -- #begin region1 #end Some text. #begin region2 #end Some text. Some text. Some text. -- will become:

Re: shell for vim

2012-03-08 Thread Tim Chase
On 03/08/12 06:42, Mark Wilden wrote: On Wednesday, March 7, 2012 4:02:21 AM UTC-8, Joan Miquel Torres wrote: In other words: You probably love screen ;-) I've heard screen mentioned with Vim several times now, and I just have to ask: How does this differ from simply having a Vim window and a

Re: Find duplicated lines

2012-03-08 Thread Tim Chase
On 03/08/12 06:45, Alessandro Antonello wrote: pass1 key: 9534 1CFF A92D 76B9 B52C 79E5 1D10 85E5 pass2 key: 6C66 D635 3922 1D99 6FCE 8366 7992 C3DE passN key: F906 930C 2FD3 6B4B 7A2C 1AF5 C314 D62C There are several of that 3 lines. I could ':sort' the file to find duplicated lines but, what

Re: Textpad to GVIM

2012-03-08 Thread Tim Chase
On 03/08/12 07:27, Govind wrote: In which case it will be interesting to see if I can do the command sequence x all; f all 'search string' that is incredibly useful when editing cobol programs or mainframe files, i.e. show me only the lines that satisfy the search criteria. I don't see any need

Re: shell for vim

2012-03-08 Thread Tim Chase
On 03/08/12 08:15, Mark Wilden wrote: On Thu, Mar 8, 2012 at 5:11 AM, Tim Chasev...@tim.thechases.com wrote: One of the biggest advantages of screen is that you can detach from it and the re-attach from another machine. Just to be crystal clear - that's why you would use screen, right? There

Re: Map in visual mode to delete indent

2012-03-08 Thread Tim Chase
On 03/08/12 11:43, Juanjo Gomez Navarro wrote: Hi, I would like to create a map which removes all sort of indent within a selected text. I have tried this: vnoremapBS s/^ *// But when I select the text (with V) and then press backspace, I get the whole line replaced by the text /^*// In

Re: Textpad to GVIM

2012-03-07 Thread Tim Chase
On 03/07/12 20:51, Govind wrote: Btw, I've been using the ISPF editor for many years now, and that's no picnic either for people coming from a WYSIWYG environment! I've yet to find its handy feature of being able to hide lines (Xing them out) in any PC text editor. While I'm not familiar with

Re: Functionkey confusion

2012-03-07 Thread Tim Chase
On 03/07/12 21:10, meino.cra...@gmx.de wrote: I am using vim 7.3.470 on a Gentoo Linux system. Could you clarify whether this is vim or gvim? And if (non-g)vim, which terminal emulator(s) are you using? I've found that some terminals relay key-codes more reliably than others (I generally

Re: Exclude pattern in global command

2012-03-05 Thread Tim Chase
On 03/05/12 05:42, Jostein Berntsen wrote: I would like to search all lines with -- in a file, but exclude all these lines with (X) in them. Is this possible to do with the global command? /\%(.*--.*\^\%(\%((X)\)\@!.\)*$\) Using Dr. Chip's LogiPat.vim[1] makes generating these monstrosities

Re: Alternating lines' color

2012-03-03 Thread Tim Chase
On 03/03/12 15:33, Tarlika Elisabeth Schmitz wrote: func! s:ColorAltLines() if exists('b:ALTLINES_disable') || exists('g:ALTLINES_disable') What is the sifnificance of s:, b: and g: ? Could you point me to the relevant manual page? You can ask for help on any of the variants (so to speak):

OT: hosting (was Re: Dr Chip)

2012-03-03 Thread Tim Chase
On 03/03/12 18:39, Phil Dobbin wrote: Or alternatively there are good deals to be had with a VPS nowadays if you want complete root access to a box (configure your own mail server so forth) at realistically nearly the same price as shared hosting. I personally use 6sync find them great.

Re: abbreviation does not work after map CR

2012-03-02 Thread Tim Chase
On 03/02/12 11:01, Christian Brabandt wrote: I think, this is because of the 'cpo' option including the '' char (see :h cpo-) which means, vim doesn't recognizec-gu as breaking the undo sequence. If you set cpo-= cpo-=u it should work however. Issuing vim -u NONE :set cpo-= :iab aa

Re: abbreviation does not work after map CR

2012-03-01 Thread Tim Chase
On 02/29/12 22:27, Yichao Zhou wrote: You might try :inoremap cr c-]c-gucr But if the word before the cursor is not a abbreviation, it will insert a literal ^], which is not an ideal solution. This is strange. I performed the following: 1) put the following 2 lines in temp/c.vim iab aa

Re: abbreviation does not work after map CR

2012-02-29 Thread Tim Chase
On 02/29/12 08:41, Yichao Zhou wrote: I found a very annoying problem. If I mapCR like :inoremapCR C-GuCR Then theCR will lose the ability to translate the abbreviation. Other maps does not work either. So are there any workaround to makeCR work in abbreviation while

Re: Need help in recovering file in vi.

2012-02-29 Thread Tim Chase
On 02/29/12 14:02, Tayade, Nilesh wrote: While modifying my own code I accidently saved the file using .wq (note the dot placed accidently) and lost the contents. I am not really able to understand what this command did and how the contents are lost. Could someone please provide any pointer on

Re: underlining support for markdown syntax?

2012-02-28 Thread Tim Chase
On 02/28/12 05:41, r...@mglug.de wrote: im looking for a posibillity for fast underlining some Text with a charakter like = or -, which is used in markdown-Syntax. I.E. if I write some comment in a program like # This is an big Headline # === # # And this a

Re: If there is a in exactly the 80th character, the following lines will be double-quoted after gq

2012-02-27 Thread Tim Chase
On 02/27/12 14:11, Matt Ackeret wrote: I got an email that had in exactly the 80th column. (I read email in alpine, with vim as my alternate editor.) The text was not wrapped, so I gq it. I see the same peculiar behavior in my slightly older 7.2.445 (stock on Debian Stable). To duplicate,

Re: Using z in vim

2012-02-21 Thread Tim Chase
On 02/21/12 10:39, Ven Tadipatri wrote: But I don't want that. I want to make the current line that I'm on scroll to the TOP of the screen. You want either zt or zcr depending on whether you want to reset the cursor to the first column: :help zt :help zCR On a somewhat related

Re: Can't see my * register.

2012-02-20 Thread Tim Chase
On 02/20/12 10:58, Ney wrote: I'm on Mint 12 and using vim on gnome-terminal. I can't paste the content of my clipboard into vim because the * register disappeared. Usually i typed *p and the clipboard was there. Which build of Vim are you running? This is a common symptom of running a

Re: How to debug when vim becomes quite slow?

2012-02-18 Thread Tim Chase
On 02/18/12 08:15, kindle4ever wrote: When i open a file with 4000line code, the response of vim becomes quit slow. At the mean time i input a word, vim costs 40% cpu. After switching to another vimrc, it works fine again. Can anyone tell me how to debug in vim? Because the vimrc script is

Re: Is there a way of moving in the jump list without using ctrl_i?

2012-02-14 Thread Tim Chase
On 02/14/12 11:58, skeept wrote: in my vimrc I have maptab c-w This is very convenient for all the window commands (like close, go to previous, go to top, etc...) but it seems that this prevents me from using the ctrl_i command. So if I type ctrl_o then I cannot go back just by typing ctrl_i.

Re: C-w dw

2012-02-10 Thread Tim Chase
On 02/10/12 11:30, David Gomes wrote: I use C-w on terminal to delete a word, and tried to bind C-BS to do the same, but failed. Later on, I got used to C-w, and I want to use it on gvim too, but only C-BS works, how can I make C-w work? Basically, I need to make C-w do the same as dw. Are

Re: 'command-list' in 'Q' and 'gQ' ex-mode

2012-02-08 Thread Tim Chase
On 02/08/12 16:17, SamLT wrote: my text looks like this: snippet starting at line 13 --- A 1 BBB 7 11 end of snippet(line 27) --- To give you an idea, I want to make a table of content which would look like this A.1 BBB...7

Re: todo.rb is a todo list manager that uses ed edit syntax

2012-02-04 Thread Tim Chase
On 01/30/12 00:05, Daniel Choi wrote: This is not strictly Vim related, but since this project pertains to Vim's ancestor ed, I thought it appropriate to post this announcement here. http://danchoi.github.com/todo.rb/ Just so you know this didn't go unnoticed, I tinkered with it a little.

Re: Delete intervening wnitespace (and CR) between words

2012-02-02 Thread Tim Chase
Sheets Sheets of gold Is there an efficient way to delete the intervening white space and CRs between the 'Sheets' to end up with Sheets Sheets of gold If you mean newlines where you type white space, you can just highlight the text and type J to join them. If you want to normalize

Re: Display messed up

2012-01-31 Thread Tim Chase
On 01/31/12 14:58, Marco wrote: http://i42.tinypic.com/23l84x.png My first suspicions are: possibly a corrupted font file, possibly a corrupted termcap database, or perhaps a bad memory chip (or some other hardware in the picture). A workaround is to resize the window. Then immediately

Re: Display messed up

2012-01-31 Thread Tim Chase
On 01/31/12 16:27, Marco wrote: On 2012-01-31 Tim Chasev...@tim.thechases.com wrote: I can't tell you why, but I have the strong feeling that it's not a hardware issue. With the behavior changing based on $TERM, the possibility of a hardware issue no longer ranks high on my list of

Re: set a mark in an arbitrary file

2012-01-30 Thread Tim Chase
On 01/30/12 03:39, Samuel Ferencik wrote: Is there a way to set a mark to a file not loaded in a buffer, just specified by the filename? I keep losing my (uppercase) marks, and would like to set them up in my .vimrc. I'd do this using setpos(), but that requires a buffer number. I want to call

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

Re: Why is caret (^) so slow?

2012-01-29 Thread Tim Chase
On 01/29/12 18:50, Tim Johnson wrote: I've been using vim for 12 years now :) and am just getting around to ask this question. Why is the ^ so slow? When I press ^, there is a noticeable wait time before the first non-blank char is selected. Answer: it's not, by default. :) It's likely a

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: '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: 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: 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

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

: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

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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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

<    5   6   7   8   9   10   11   12   13   14   >