On 06/05/2011 12:30 PM, Tim Johnson wrote:
I'm unclear about when to use and when *not* to use the colon in a
string for the `execute' command - as composed programmatically.
I'd appreciate it if someone could point me to some documentation or
discussion on this topic.
:h execute
doesn't seem
On 06/11/2011 11:13 AM, Marco wrote:
is there a command to delete up to the character before a
match?
:h t
Thanks a lot for these four characters. That's it.
While you're reading in there, be sure to read about the various
variants: f/F/t/T/,/;
I use them all pretty regularly
On 06/13/2011 03:18 AM, stardiviner wrote:
I can have a simple way to add ` ` for each code line.
like this:
print hello - ` print hello `
You can do that easily with a mapping:
:nnoremap f4 :s/.*/``cr
:vnoremap f4 :s/.*/``cr
which will allow you to do both a single line in normal-mode,
On 06/16/2011 12:26 PM, David Ohlemacher wrote:
Is there a way to do a reverse join?
Example:
// Foo comment
int foo;
Reverse Join would result in:
int foo; // Foo comment
I am editing someone else's old code and do not like the 100s of wasted
lines.
If you want to do it on
On 06/19/2011 02:04 PM, ThG wrote:
I use Vim to write a book.
Each Vim line ended by a carriage return will be a paragraph of the
book. Thus a single Vim line (which is wrapped, e.g. with a 80
character screen in 10 screen lines) can end as a 15 line paragraph in
the book. But I have one problem
On 06/19/2011 11:15 AM, rameo wrote:
I would like to know how to remove everything except pattern.
p.e.
hello this is an example, hello to everybody
example hello
I do a search for hello
My output has to be:
hellohello
hello
or
hello hello
hello
My first thought would be something
On 06/20/2011 07:19 AM, rameo wrote:
On Jun 20, 1:50 am, Tim Chasev...@tim.thechases.com wrote:
hello this is an example, hello to everybody
example hello
I do a search for hello
My output has to be:
hellohello
hello
or
hello hello
hello
My first thought would be something
On 06/20/2011 10:00 AM, rameo wrote:
hello this is an example, hello to everybody
hello
this is the output of the text when I use your command %s/\w\+\W*/
\=submatch(0)=~'hello'?submatch(0):'' :
hello this is an example, hello to everybody
hello
Ah...it looks like it was missing the g
On 06/20/2011 11:35 AM, rameo wrote:
This is my command to search emails:
\([A-Z0-9+_.-]\+@\([A-Z0-9-]\+\.\)\+[A-Z]\{2,6}\)
p.e.
myem...@mydomain.com hello myotherem...@mydomain.com
hello mylatestem...@mydomain.co.uk
Putting that in your command gives an empty output (it removes the
emails).
On 06/21/2011 04:45 PM, Grador wrote:
Hi,
I have lines like this(there could be any number):
DELAY : 462
I want to replace all lines with number higher then 200 with 200. So
the line above should looks like this:
DELAY : 200
If I use this replace commnad:
:%s/DELAY : [201-]/DELAY : 200/g
On 06/20/2011 12:22 PM, rameo wrote:
myem...@mydomain.com hello myotherem...@mydomain.com
hello mylatestem...@mydomain.co.uk
Putting that in your command gives an empty output (it removes the
emails).
Ah...with that context, I might try to approach the problem
differently. If you don't
On 06/24/2011 03:03 PM, fachhoch wrote:
I use windows and like to use vi , I downloaded vi , would like to
know how to open vi in dos prompt like it opens in unix shell ?
Assuming you have them in your $PATH (or should I say %PATH%),
there's a vim.bat file that should run by default within
On 06/27/2011 04:11 PM, russurquha...@verizon.net wrote:
I know that when i yank LINES, the put command (p or P) will
put those lines before or after the line the cursor is on.
When i select something less than a line, it puts it before or
after the current position. My question, is there a way
On 06/27/2011 03:58 AM, lostmenuts wrote:
I would like to have line numbers displayed on a margin that has a
different colour to the rest of the document to make it stand out and
look nicer, how can I do that?
At the moment I can have a coloured colum (set foldcolumn=2)
OR line numbering but I
On 06/28/2011 06:11 AM, Ben Schmidt wrote:
think what I need to do is to retriggle those 'autocmd' that would
been usually executed if I don't do 'noau ...'. Can anyone tell me
how to, if possible?
:doau Filetype c
perhaps? Or
:doau BufRead
which will call :setfiletype and thereby
On 06/28/2011 07:31 AM, Russell Urquhart wrote:
I tried the Ctrl-R while in insert mode. (I generally use +gP
to put stuff yanked from another program, so i tried to put
the contents of that register.) But no luck. I'll try this at
work as well, and look more into the help messages.
Ctrl-R
(reordering to interleaved reply, the preferred quoting style on
the vim mailing list, as noted in the footer added by the list)
Ctrl-R enter a sub-mode expecting the register-name
following it, so if you want the system-clipboard, you'd
want to use control+R followed by +.
Ahh, that did it!
On 07/03/2011 02:18 AM, meino.cra...@gmx.de wrote:
Xiaopan Zhangzhangxiao...@gmail.com [11-07-03 09:08]:
I can use the following key strokes 'd/_variable + 7CR', will does
the job precisely, However, one problem is that after the deletion,
'_variable + 7' will be highlighted if it occurs in
On 07/04/2011 03:07 AM, Kent wrote:
last weekend I finally did the switch from .vim to
vim-addon-manager. after the change, I made some small tests,
almost everything looks fine. but the arrow key don't move
cursor in INsert mode any longer, just ouput A, B, C, and D. I
remembered that could be
If the file is large, but the number of resulting unduplicated
lines is manageably small (say a couple megs), you can do it in
O(N) rather than O(N^2) or O(N*M) where N is the number of lines
and M the number of duplicates. Just store each line in a dict
as you process them and then delete
On 07/08/2011 04:25 AM, Gabor Urban wrote:
I have a minor problem: is there a possibility to indent /
unindent a block of code?
Of course :) Vim uses the and operators to shift by
'shiftwidth' and uses tabs-vs-spaces as controlled by the
'expandtab' setting:
:help
:help 'sw'
On 07/08/2011 06:23 AM, Ivan S. Freitas wrote:
On Fri, Jul 8, 2011 at 8:17 AM, Tim Chasev...@tim.thechases.com wrote:
On 07/08/2011 04:25 AM, Gabor Urban wrote:
I have a minor problem: is there a possibility to indent /
unindent a block of code?
Ops, seems I mistook indent for comment. My
On 07/08/2011 04:35 AM, eleanor wrote:
Hi, I installed the VCSCommand plugin and all is working fine.
The only problem is that I have a remote repository and a
clone working directory. But there are no commands for
pushing/pulling to/from the remote repository.
I can execute the actual command
On 07/09/2011 04:10 AM, eleanor wrote:
Push the current working directory to repository
function RepoPush()
:! git push origin master
endfunction
Tell me what do you think about the solution. Do you see any errors ...
anything that could be better?
Two things stand out to me:
1) the :
On 07/14/2011 07:31 AM, fabien.boul...@ses.com wrote:
I'm using Vim 7.3 on Linux (I believe the OS doesn't matter)
and I would like to know whether (and how) it is possible to
make the :split command perform a :bottom split by default?
:help 'splitbelow'
and the following 'splitright'
to the kind hints of Tim Chase and Zyx,
I tried the following in my .vimrc:
set selectmode += key
set keymodel += startsel
I'm not sure why you think that the values should be in quotes or
with spaces around the assignment, both of which render the
command ineffective. I advised you ry
:set
On 07/16/2011 06:38 AM, Asis Hallab wrote:
I do not understand, why the arguments have to be passed
without the -char surrounding them, though Vim-Documentation
states selectmode and keymodel are comma separated lists of
strings.
There are two issues:
quotes: vim treats the things that follow
On 07/22/2011 05:59 PM, Jose Caballero wrote:
So far, that is the best solution I have. It is quite ugly, but seems to
work...
function Comment()
let firstline = search('^\s*$', 'bnW') + 1
let lastline = search('^\s*$\|\%$', 'nW', line('$'))
if lastline != line('$')
On 07/23/2011 12:59 PM, Jose Caballero wrote:
2011/7/23 Ben Schmidtmail_ben_schm...@yahoo.com.au
You don't need to apologies for bothering us. If we didn't enjoy helping
people with Vim, we wouldn't be on this mailing list. It's also clear
that you've put in some effort yourself into solving
On 07/24/2011 06:03 PM, Jose Caballero wrote:
2011/7/24 Taylor Hedbergtmhedb...@gmail.com
:call is always needed in order to call a function if the
function call is not otherwise wrapped in some ex command
I need to digest that. I think I should start learning once
and for all what is exactly
On 07/24/2011 09:34 PM, Tony Mechelynck wrote:
On 25/07/11 03:41, Jose Caballero wrote:
I don't know what you get for :help call
Hm, strange.
Is this hitting the difference between these two?
:help call
:help :call
-tim
--
You received this message from the vim_use maillist.
Do
On 07/27/2011 06:43 AM, Eric Smith wrote:
Is it possible to access the text added to a document within the last
n seconds?
So I want the effect of this;
If I did a checkin to version control periodically, and then I produced a diff
for each period I was interested in.
(I am more interested in
On 07/30/2011 05:22 AM, ranou...@gmx.com wrote:
I want to perform a substitute command on odd lines only.
Is there some some range for this like sed 1~2 in vim?
Else do you know a better solution than
:%!sed '1~2s/pattern/replace/'
Not natively, but it's easy to do something of the sort:
On 07/30/2011 02:42 AM, Liunx wrote:
problem when i try to load large files, then when i unload
these files with :bd or :bunload, my vim never release the
relative memory, i wondering why?
:bd and :bunload don't free all resources associated with the
file. You might try :bwipe instead to see
On 08/04/2011 03:16 AM, ranou...@gmx.com wrote:
1) If I understand right, :append is used this way
:append
line1
line2
.
and . means end, in a similar way as
catEOF
line1
line2
EOF
What could I do if I want to insert a line containing only a point.
I don't really need this but I'm curious ;-)
On 08/04/2011 08:59 AM, ranou...@gmx.com wrote:
For such an example, I'd use a combination of :put with the
expression register, which takes a list:
:put=[var, 'line2', '.', 'that was a line with 1 period']
Just to be clear, I should have said :put with the expression
register, which *can
On 08/04/2011 10:02 AM, ranou...@gmx.com wrote:
How are you finding that -c does not do exactly the same thing? I
just issued:
bash$ seq 20 test.txt
bash$ ex -c '10s/$/hello' -c '15' -c 'wq' test.txt
The result in the file is the same, but when I launch the command I see
a kind of
On 08/08/2011 02:49 PM, Bram Moolenaar wrote:
Christian Brabandt wrote:
On Do, 04 Aug 2011, Tim Chase wrote:
I tried :put =[ 'str1', 'str2', '', 'str3', '' ]
the '' are here to insert empty lines.
The last one is not inserted.
I see the same results here (the first empty string is added
On 08/08/2011 09:32 PM, Benjamin R. Haskell wrote:
On Mon, 8 Aug 2011, Tim Chase wrote:
On 08/08/2011 05:10 PM, flipxfx wrote:
What does this do in Vim?
q'a^i--[esc]jma^2xq
[snip]
Now as to *why* one would want to do all this,
Still not quite clear how generally useful this might be.
I
On 08/10/2011 04:56 AM, Lars Relund wrote:
Using \tt with the Align script converts the following table
\begin{table}
Foo
Bar\\
12\\
100300\\
\end{table}
to
\begin{table}
Foo
Bar \\
1 2 \\
100 300 \\
\end{table}
(aligned at)
However, I want a line for each \\. For example
Foo
Bar \\
On 08/14/2011 01:51 PM, Leonardo Barbosa wrote:
What i wanna is: see my file as if there is no comment at all.
In other words, toogle btw hide/unhide comments. Is there a
simple way of doing that?
If you're willing to have multi-line comments folded down to a
single line (which it sounds like
On 08/14/2011 11:42 AM, Tim Johnson wrote:
I'd like to find a way to align one or more lines with the same
indentation as (say) the previous line:
Example :
Main entry point for this module.
Process all.
Delete all.
To
Main entry point for this module.
Process all.
Delete
On 08/17/2011 07:01 AM, woodygar wrote:
i would like to edit my vimrc so gvim cursor always starts on line 4
as i have a templete that uses the first 3 lines. For example, In the
terminal i can use gvim + 1.py but i can't figure out how to edit
vimrc so its automatic.
You could add an
I'd like to be able to set wrap linebreak so that my long(er)
lines of code wrap at my 80-column margin. However the wrapped
lines display starting at the left margin. E.g.
|def my_func()|
| for thing in (1, 2,|3, 4, 5)
| |
^
On 08/20/2011 06:05 PM, AK wrote:
Hi, I was trying to change $ command to go to N chars before the end of
line, and found it surprisingly hard to do. Here's what I come up with:
func! EndOfLine()
exe normal \End
let c = v:count
let c2 = c - 1
let cmd = normal . c2 . k .
On 08/21/2011 03:48 PM, Guido Van Hoecke wrote:
Csharp class methods do not have the { in column one, so I would like to modify
the [[, ][, ]] and [] mappings as suggested in motion.txt, lines 495-500:
If your '{' or '}' are not in the first column, and you would like to use [[
and ]] anyway,
On 08/21/2011 11:58 PM, John Beckett wrote:
I just reworked an interesting idea added to this tip:
http://vim.wikia.com/wiki/Highlight_all_search_pattern_matches
The following script means you can press Enter to toggle search
highlighting for the current word on and off (without moving the
On 08/22/2011 01:15 PM, AK wrote:
On 08/22/2011 01:47 PM, Tim Chase wrote:
Should the last file in the resulting filespec
override the others (as if :e f[12].txt did the same thing as :e
f1.txt followed by :e f2.txt)?
My guess is that if you asked 100 vim users, 90-95 would be fine
On 08/21/2011 01:20 PM, AK wrote:
On 08/20/2011 08:03 PM, Tim Chase wrote:
On 08/20/2011 06:05 PM, AK wrote:
Hi, I was trying to change $ command to go to N chars before the end of
line, and found it surprisingly hard to do. Here's what I come up with:
I got it working with:
:nnoremapsilent
On 08/22/2011 04:26 PM, AK wrote:
On 08/22/2011 05:15 PM, Tim Chase wrote:
function! Edit(really, ...)
if len(a:000)
for globspec in a:000
let l:files = split(glob(globspec), \n)
for fname in l:files
exec 'e'.(a:really).' '.(fname)
endfor
endfor
else
exec 'e'.(a:really)
endif
endfunction
On 08/23/2011 03:02 AM, Tom wrote:
Scripting solutions aside, I thought the mailinglist would be
a good place to talk with developers of vim (or policy makers)
on their view on this. Do they post here?
There are a number of Vim devs on this list, though many just
lurk and pop up as needed.
On 08/22/2011 10:51 PM, ZyX wrote:
Reply to message «Re: :e handles one file»,
sent 01:15:56 23 August 2011, Tuesday
by Tim Chase:
which should give you an :E command that works like :e except
that if you give it one or more filespecs, it loads them all and
leaves you on the last one. E.g
On 08/24/2011 11:37 AM, DK wrote:
Not being an expert at regex I have been a bit baffled by how to do a
grep/vimgrep to match. I am probably stepping on my own foot as I
think I have done such in the past but have not been readily able to
do this. Can anyone point me in the right direction?
I
On 08/24/2011 12:00 PM, Marc Weber wrote:
Not being an expert at regex I have been a bit baffled by how to do a
grep/vimgrep to match.
That's what I'm doing:
https://github.com/MarcWeber/vim-addon-other/blob/master/plugin/vim-addon-other.vim
defines mappings \dl and \kl (drop lines and keep
On 08/25/2011 06:17 AM, John Beckett wrote:
lessthanideal wrote:
function RangeTest() range
echo a:firstline . . a:lastline
endfunction
command -range=% CallRTline1,line2call RangeTest()
These two commands give the same output
:CallRT
:%CallRt
Could the function distinguish between the
On 08/27/11 03:59, meino.cra...@gmx.de wrote:
I have the vimdiff of two files open.
As the diffed lines of some kind are not interesting in the moment,
I want to g/pattern/d them out of the way on both windows.
How can I apply the command to both, without entering the cmd
again and without
On 08/30/11 01:09, niva wrote:
I am using Gvim 7.3 through a remote connection desktop.
All toolbar's icons are black.
I don't think it comes from Vim but from windows or graphical drivers
but have you got some idea ?
While I haven't experienced this with Vim, I've had similar
issues with
On 08/31/11 07:23, Lars Iselid wrote:
If you have a search statement something like this:
/[0-9]
And want to write :w the matching content to a file. How to do? I've
seen examples similar to this:
/[0-9] . w my.txt
Depends on whether you want to write just the match, or the
entire line.
On 09/01/11 01:10, Lars Iselid wrote:
I want to write the digits and actually my full regex in vim
is: /[-0-9]\{13,17\}
I want numbers with 13 to 17 digits even if they have hyphens
between the digits.
For this, I'd tend to do something like put each match on its own
line and then delete all
On 08/30/11 10:08, Joey Beninghove wrote:
Also, it's still very early, but I'll definitely need some
presenters lined up, so let me know if you're interested in
giving an online teaching session for VimConf.
While I acknowledge it's still early, it might be helpful to know
what sorts of
On 09/01/11 21:22, tplarkin7 wrote:
I would like to capitalize the words, Narrator (v.o.) between the paragraph
tags below:
I need to keep the entire tag as shown. For example, other tags have a
margin of 1in, and I don't want to capitalize between them.
Another issue is the hard return
On 09/02/11 06:43, John Goche wrote:
foo.bar.cat.nav
the cursor is over bar. I want to search for bar.cat.
That should be three words including the dot. I would
like to give the command
3*
This (as you may have discovered) searches for the third match of
the single word under the cursor.
On 09/01/11 19:15, Hozzy2u wrote:
I found what appears to be a phenomenal program, Vim but it
looks to be more than a little intimidating.
Indeed, Vim has a learning-curve a bit like a brick wall. Once
you understand the modal nature, and the
{count}{operator}{motion} pattern of commands,
On 09/02/11 13:37, Hozzy2u wrote:
I just want to thank everyone for their quick response to my
question. I have just downloaded the Vim Recipes PDF file
and printed it out so I could highlight and add notes as I
read it.
as much as I'd like to support authors of Vim books, I'm glad you
didn't
On 09/02/11 11:29, tplarkin7 wrote:
I then used VIM to capitalize the text since ordinary regex does not have
that ability.
For those that can't see the code I posted, it is visible in VIM's forum.
Ah, you're posting through Nabble which doesn't seem to pass
along the HTML to the official
On 09/05/11 00:53, Kay Z wrote:
I was trying to align using Tabularize plugin:
1. name1=Woof
2. lucky_dog = lucky( dog_one= name1,
3.dog_two= name1 )
4. name2=Howl
I wanted it to align like this:
1. name1 = Woof
2. lucky_dog = lucky( dog_one= name1,
3.
On 09/06/11 14:57, Kay Z wrote:
1) use a decorate-tabularize-undecorate pattern, something like
:','v/^\/-j!
:','Tabularize
:','s/,/,\r/g
Thanks Tim! This regex works well, and I got the results I wanted.
One note is that for those who use Tabularize you just have to change
On 09/05/11 12:58, sbq wrote:
Here is my weird experience. I want to modify fzdefaults.xml, a
FileZilla config file located in the Windows 7 directory C:\Program
Files\FileZilla FTP Client. Here's what happened.
1. In Windows Explorer select fzdefaults.xml
2. right-click, in the context menu
On 09/06/11 19:34, Benjamin R. Haskell wrote:
On Tue, 6 Sep 2011, Tim Chase wrote:
On 09/05/11 12:58, sbq wrote:
Here is my weird experience. I want to modify fzdefaults.xml, a
FileZilla config file located in the Windows 7 directory C:\Program
Files\FileZilla FTP Client. Here's what
On 09/07/11 05:36, Si St wrote:
I am trying something like this to recode several ot many files:
:args ./*
:while
:argdo
:1,$ !recode lat1...utf8
:update
:next
:endwhile
I am familiar with the argdo set ff=unix | update
but I do not know how to make the first example work
I suspect you want
On 09/07/11 20:14, Kelly Dean wrote:
I'm looking for something to count keyboard command
invocations in Vim, like the following for Emacs:
http://code.google.com/p/ergoemacs/source/browse/trunk/packages/keyfreq.el
The purpose is to record how frequently I use the various
commands.
I'm
On 09/08/11 16:39, dmbfm wrote:
Hey guys. I'm running vim 7.3.35 on Ubuntun 11.04. And when I
type
:%s/this/that/
n
or
:%s/this/that/g
I get the same result, i.e., it always replaces every 'this'
in the file for 'that'. Shouldn't the fist command replace
only the first occurance of 'that'?
On 09/09/11 13:45, John Goche wrote:
Hello,
I like the autoindent feature which works when I code in javascript.
However I don't want any tabs in there, I just want spaces.
I'd check your 'expandtab' setting:
:set et?
To get the behavior you want, it should be set to 'expandtab'
instead
On 09/10/11 23:39, Kevin Tough wrote:
would like to know whether most programmers use vim from the
console or do they/you use gvim.
I use gvim on Win32 because the console there is such a horrid
experience. On Linux (Debian in this case), the majority of my
use is within a terminal (rxvt
On 09/11/11 01:28, Spiros Bousbouras wrote:
On Sep 11, 4:22 am, Javier Rojas wrote:
:help iw
Thanks. I don't believe I had ever come across the iw motion
command before.
Please do take the time to follow Tony's suggestion to read up at
:help text-objects
They are one of the killer
On 09/12/11 09:40, Ben Fritz wrote:
vi
i{
I think the most useful to me is the 'it' object (inner tag) and
'at' (a tag) while editing HTML.
I agree that my most useful changes depending on my filetype.
For HTML/XML editing, the it/at/i/a are pretty indispensable,
while the
On 09/13/11 05:55, Dotan Cohen wrote:
I just discovered the terrific gd command. What a gem that is!
After using the gd command, is there a way to jump back to the place
where I was without setting a bookmark? Sort of like Ctrl-Shift-G in
Eclipse?
You should be able to use control+O (oh, not
On 09/12/11 14:39, Taylor Hedberg wrote:
Tim Chase, Mon 2011-09-12 @ 14:15:33-0500:
Maybe if I suggest it here, somebody will code my other text-object
want too: an inner-indent for coding in Python.
There's already a plugin for that! I use it regularly.
http://www.vim.org/scripts
On 09/14/11 04:55, Christian Brabandt wrote:
But of course you can achieve the same using a :s command. In your case
you only forgot to include the \n in your pattern, so Vim leaves it
in, which means you still have an empty line, but including it in your
:s command should also work:
On 09/14/11 08:45, Russell Bateman wrote:
Once I've typed in a command to search and replace for something, for
example:
%s/search/replace/g
how can I re-execute that command without retyping it? (I have a string
of source files between which I'm moving via :n each time and I don't
On 09/14/11 17:45, Gelonida N wrote:
If I search some text wtih '/',
then vim highlights this search expression in the entire text, (which is
nice).
Sometimes I'd like just to unhighlight the search.
currently I search for something non existing to do so.
However I assume, there is something
On 09/15/11 08:25, Stanley Rice wrote:
I have write some code that can change the modified data. I
search for the first 10 line of the current file, and search
for the key word Modified: , and then replace the content
after the keyword with current time stamp each time I save the
file. I thought
On 09/17/11 08:12, Tony Mechelynck wrote:
Ctrl-@ is NULL, not sure if Vim wouldn't identify it with
Ctrl-J (see :help NL-used-for-Nul) which might make it
problematic as the {lhs} of a mapping.
Vim catches ^@ just fine, not interpreting it as NL. In fact,
it's used in insert-mode to insert
On 09/18/2011 08:47 AM, Harvey Li wrote:
How to generate auto increased number lines in vim?
For example,
a[0]
a[1]
a[2]
a[3]
You might be interested in this common tip:
http://vim.wikia.com/wiki/Generating_a_column_of_increasing_numbers
-tim
--
You received this message from the vim_use
On 09/24/11 11:25, Peng Yu wrote:
I'm wondering if there are existing shortcuts in vim for convertion
between different name conventions (see example below). I feel that it
will will be convenient if there are such shortcuts.
OneFileName
oneFileName
one_file_name
one.file.name
ONE_FILE_NAME
On 09/28/11 07:59, Razvan Rotaru wrote:
What happens when I scroll down, is that the cursor is
following along. The problem occurs when the cursor jumps to a
short line (which is now out of the screen, because I am
scrolled to the right) and vim scrolls me back to the left so
that cursor remains
On 09/28/11 07:52, Amitava Shee wrote:
I have starting using the excellent surround.vim plugin. Is there a way to
mimic textmate's wrap each selected line in open/close tag ?
if you're doing whole lines, I do this infrequently enough that I
just use
:','s!.*!tag/tag
which will operate on
On 10/03/11 11:17, Taylor Hedberg wrote:
Try this:
:g/^\d.*\n[^0-9]/j
See `:help :global` and `:help :join`.
I'd almost be tempted to do
:v/^\d/-j
in case you have more than one line wrapped such as
1234 alpha beta
gamma delta
frog toad
camel muskmelon
The change
On 10/03/11 12:17, meino.cra...@gmx.de wrote:
Hi Taylor, hi Tim,
Both commands do nothing here...what did I wrong?
Does your data look like the sample data you provided? :)
Are you seeing visual artifacts of having 'wrap' set and the
lines in question don't really have newlines? When you
On 10/03/11 14:07, superfish wrote:
Facing with a data file which contains more than 7 million lines, I need to
delete all lines containingpatternA but not containingpatternB.
So far the only way I can think of is kind messy, something like this:
:g/patternB/s/patternA/patternC/
:g/patternA/d
On 10/10/11 18:05, Cesar Romani wrote:
I tried to do:
:%s/[^\k]//g
but it just removes everything.
Character-classes ([...]) don't take escaped-character-classes
(such as \k) within them, something I occasionally find
frustrating such as in your example.
Because \K isn't the inverse of
On 10/11/11 05:46, Efraim Yawitz wrote:
On Tue, Oct 11, 2011 at 1:13 AM, Tim Chasev...@tim.thechases.com wrote:
:%s/\k\@!.//g
What is that dot after the ! ? (I was wondering this about the
help on \@! but this is a chance to ask.)
\k\@! means \k can't match here (it's zero-width)
.
On 10/12/11 13:02, ni va wrote:
this is what I want but imagine..
; ; ; 48.00 ;
; ; ; 32.50 ;
; ; ; 15.00 ;
; ; ; 59.40
The subject more or less says it all, but using git and switching
branches will change the timestamps on my files even though the
underlying content doesn't seem to have changed. I'd like to
tell Vim that, for certain filespecs (likely via an autocmd), I
don't want to see this message and
On 10/12/11 16:56, Dan Wierenga wrote:
On Wed, Oct 12, 2011 at 8:32 AM, Tim
Chasev...@tim.thechases.com wrote:
I'd like to tell Vim that, for certain filespecs (likely via
an autocmd), I don't want to see this message and that YES,
I do want to always overwrite the file.
I think the
On 10/13/11 09:44, Gill, Jack wrote:
Newbie question: Will Vim allow me to batch edit a text file,
forcing characters per line to no more than 90, and placing a
CR/LF at the end of that line?
The short answer is yes. The more complex answer involves how
you want to wrap (at word-boundaries,
On 10/14/11 12:38, niva wrote:
I don't know how I can elaborate pattern that match numbers between
8353764 and 8353788?
In the general case, this is currently a non-trivial task[1] for
which I've wished Vim would add a numeric-range atom. However,
for your particular case, it's not too bad
On 14 oct, 19:55, Tim Chasev...@tim.thechases.com wrote:
On 10/14/11 12:38, niva wrote:
I don't know how I can elaborate pattern that match numbers between
8353764 and 8353788?
/83537\(6[4-9]\|7\d\|8[0-9]\)
should find the numbers in that range.
Doh! That last one should have been
On 10/18/11 09:09, Ben Fritz wrote:
On Oct 18, 7:21 am, Tim Chasev...@tim.thechases.com wrote:
On 10/18/11 06:50, Elias Diem wrote:
Without giving the '-' argument to 'less'. Why doesn't this work
with vim?
Because Vim can take piped commands:
[2]tim@bigbox:~/tmp$ seq 10 test.txt
On 10/20/11 09:35, Eric Smith wrote:
Is there a current script for simple drawing of lines or shapes while
in vim?
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?).
While I've not
101 - 200 of 1877 matches
Mail list logo