]
It looks like substitute() is the closest to what you want to achieve.
Perhaps you can add submatch() to get the result appended to the list.
Something like this in mind:
:let a=[]|g/#\w\+/call substitute(getline('.'), @/, '\=extend(a,
[submatch(0)])', 'g')
Regards,
-Arun
--
--
You received
like this in mind:
:let a=[] | g/#\w\+/call substitute(getline('.'), @/, '\=extend(a,
[submatch(0)])', 'g')
Regards,
-Arun
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information,
..but getcompletion() sometimes does not give me the full path leading to
errors.
Regards,
-Arun
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
bb XXX_a_bbb
> ee XXX_aaa___ddd
> ddd ee XXX aaa_bbb__eee
>
>
Zero width patterns are helpful here. Try,
:%s/\(XXX.*\)\@<=\s/_/g
Here, the expression says, any whitespace (\s) that is preceded by "XXX.*"
be replaced with
On Tue, Dec 13, 2022 at 7:22 PM Steve Litt
wrote:
> Arun said on Tue, 13 Dec 2022 18:22:41 -0800
>
> >Usually, I :split open (maximized) my active files
>
> For me, :split only makes 2 windows, not a window for every buffer.
>
# vim -o ..
If you are already insid
pings help in
achieving that:
"--8<--
set nocp
set winminheight=0
set laststatus=2
au WinEnter * wincmd _
"Map Alt-j to edit split window one below. "Alt" works well in GUI, use
something else inside terminals
nnoremap j
"Map Alt-k to edit split window one above
nnoremap k
&
:warningmsg=""
endf
"call CheckWrap using standard statusline
set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P%{CheckWrap()}
---
The above should ring the bell (provided you did not disable it) on search
wraps.
Regards,
-Arun
On Thu, Oct 6, 2022 at 12:33 PM Lifepillar wrote:
This seems to work well too (tested with 8.1):
%s/\(\S\+\)\>.*\n/xx\1yyy,/
Regards,
-Arun
On Tue, Sep 6, 2022 at 3:43 PM Tim Chase wrote:
> On 2022-09-06 14:45, andalou wrote:
> > I have the table:
> > 1001 John Sena 4
> > 1002 Jafar Iqbal 6
> > 100
ledit=onemore
Alternatively, have you considered recording/macros?
:h complex-repeat
You could just record a set of key strokes using the "q" command and
recall the sequence whenever you want.
Regards,
-Arun
> I suppose I could use "Tdx".
>
> I figured that ther
a
script sometime ago that searches for the exact changed text within a
changed line using the above logic. You can modify that to suit to your
needs.
Regards,
-Arun
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replyi
keeps
it ever interesting.
As for the above issue, "folds" are good too.
- goto just before start of function and: zfgg
- after end of function: zfG
To prevent search from opening folds:
:set foldopen-=search
For running commands that skips closed folds
:foldd {cmd}
Regards,
-Arun
On Fri, Feb 23, 2018 at 9:43 AM, Igor Forca <igo...@gmail.com> wrote:
> @Arun, I have tested your code in deep. It is working perfectly. What I
> have found is little trouble in the case when first line include the change.
>
> File1:
> aaa ccc
> aaa ccc
>
&
On Thu, Feb 22, 2018 at 9:26 AM, Arun <aema...@gmail.com> wrote:
> On Wed, Feb 21, 2018 at 10:53 PM, Igor Forca <igo...@gmail.com> wrote:
>
>> @Arun, thanks a lot for this code. I have performed two tests:
>>
>> TEST 1: LINES WITH NO DIFFERENCE BETWEEN TW
On Wed, Feb 21, 2018 at 10:53 PM, Igor Forca <igo...@gmail.com> wrote:
> @Arun, thanks a lot for this code. I have performed two tests:
>
> TEST 1: LINES WITH NO DIFFERENCE BETWEEN TWO LINES WITH DIFFERENCES
>
> File1:
> aaa aaa
> aaa bbb
> aaa aaa
> aaa bbb
>
]x :call DiffSearch('curline')
-- 8< --
Use ]c for the behavior you want, and use "]x" if you want to search in the
current line. Feel free to modify this to suit to your needs.
Once search pattern \%h or \%s (help todo.txt) gets implemented in vim, you
should be able to jus
; set, you could immediately see what your
pattern matches.
Regards,
-Arun
On Mon, Feb 19, 2018 at 12:40 PM, Ni Va <nivaem...@gmail.com> wrote:
> Hi,
>
> 1/Got a list mirror of file read that contains these kind of lines:
> 19 févr. 2018 15:49:09.301 Foo.BarFoo() - FIN
On Sat, Feb 11, 2017 at 11:52 AM, Tim Chase <v...@tim.thechases.com> wrote:
> On 2017-02-11 11:26, Arun wrote:
> > On Sat, Feb 11, 2017 at 2:37 AM, Bram Moolenaar wrote:
> >> Perhaps this will work:
> >> :{range}copy {address} !cmd
> >>
> >
ork with :g, hope it wont be executing the
filter against each line, rather as a whole. It would be useful to have a
set of lines selected using :g applied against a filter. If the output of
the filtered command be captured to a register (or to a destination line,
like copy), that woul
On Mon, Aug 8, 2016 at 11:51 AM, Nikolay Aleksandrovich Pavlov <
zyx@gmail.com> wrote:
> 2016-08-08 20:44 GMT+03:00 Arun <aema...@gmail.com>:
> > On Mon, Aug 8, 2016 at 12:11 AM, Marc Weber <marco-owe...@gmx.de> wrote:
> >>
> >> :h search() ->
it to
>
> :nnoremap n nzz
>
> and you're good to go.
>
>
As it appears that the intent here is to re-center the searched line,
another approach is to set a high 'scrolloff' lines, like
:set scrolloff=999
That way, even backward search (or any other jump for that matter) would
als
I do is visually select the lines and do one of the above delete
(ctrl-d) or yank (ctrl-y) operations depending on the context. The mapping
started off as an experiment initially, but now it is an indispensable to
me.
Regards,
-Arun
On Thu, Dec 17, 2015 at 5:04 AM, Christian Brabandt <c
On Thu, Dec 17, 2015 at 1:05 PM, Christian Brabandt <cbli...@256bit.org>
wrote:
> On Do, 17 Dez 2015, Arun wrote:
>
> > visual indication is a very acceptable trade off for me. I have two
> > visual mode mappings in that regard:
> >
> >
> > :vnor
You can try the zero-width variant too:
%s/\(<[^>]*\)\@<=[^>]\(.*>\)\@=/x/g
..seem to work.
On Wed, Dec 16, 2015 at 1:19 AM, Igor Forca wrote:
> It works. Thanks a lot.
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply
Looks like it is signed operation always, you can try these mappings
instead:
Keeping cursor on a number, hit these
nn c-a ciwc-r=@+1cresc
nn c-x ciwc-r=@-1cresc
You can, maybe, write a function to move to the nearest number to mimic
native ctrl-a behavior.
Regards,
-Arun
On Thu, Jun 4, 2015
I think i understand what you are saying. I was misinterpreting the
reference manual terms 'start of motion' and 'end of motion'; i was
determining start and end of motion based on direction that the cursor
moves, which like you said, is not the correct way.
Thanks :),
Arun
On Mon, Mar 30, 2015
of the macro, you can drop
it.
Regards,
-Arun
--
--
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google
c-v is something I use quite frequently for block insertions/delete.
:h blockwise-operators
As a simple example, to comment a bunch of adjacent shell script lines, I
use:
^
c-vjjj
I#esc
v/V, very rarely, I mapped it to :n/:N
Regards,
-Arun
On Thu, Jan 29, 2015 at 7:56 AM, Enno
like this should do:
:g/^\(this is line \)\(\d\+\)\(.*\)\n\1\(\2\)\@!\d\+\\3$/+p
-Arun
a search command is preffered over a vimscript.
--
--
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information
Ben's method would do it.
One more way to do this is:
:g/.*arch\.*\(sparc.*\)\@!$/d
--Arun
--
--
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You
On Thursday, July 26, 2012 2:37:54 PM UTC+5:30, Christian Brabandt wrote:
On Thu, July 26, 2012 11:01, Arun wrote:
On Wednesday, July 25, 2012 7:50:27 PM UTC+5:30, Arun wrote:
Hi,
Recently I have added the following vim plugins - Source Explorer,
NERDTree and Trnity.
I
On Thursday, July 26, 2012 10:04:59 PM UTC+5:30, Ben Fritz wrote:
On Wednesday, July 25, 2012 9:20:27 AM UTC-5, Arun wrote:
Hi,
Recently I have added the following vim plugins - Source Explorer, NERDTree
and Trnity.
I found that with Source Explorer I am not able to traverse
On Wednesday, July 25, 2012 7:50:27 PM UTC+5:30, Arun wrote:
Hi,
Recently I have added the following vim plugins - Source Explorer, NERDTree
and Trnity.
I found that with Source Explorer I am not able to traverse the Taglist. I
could go to the taglist window using Ctrl-w h. However
Hi,
Recently I have added the following vim plugins - Source Explorer, NERDTree and
Trnity.
I found that with Source Explorer I am not able to traverse the Taglist. I
could go to the taglist window using Ctrl-w h. However, in that window I cannot
go to a tag. The cursor is always in the
\Ruby191\bin to path.
Regards,
Arun
--
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
with that file open and the correct function under the cursor.
Try set switchbuf=usetab. Also take a look at :h switchbuf.
-arun
--~--~-~--~~~---~--~~
You received this message from the vim_use maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---
to the particular class.
c. A related question. Can anyone comment on cscope for c#/java? Does
it allow to search for tokens w/ namespace/class context?
Appreciate any help here.
Thanks,
Arun
--~--~-~--~~~---~--~~
You received this message from the vim_use maillist.
For more
. Is there a whole different set of options for java
syntax?
Could someone please help me out, or tell me where to look?
Sorry, I don't know the exact solution. But you may want to modify
$VIMRUNTIME/indent/java.vim.
That file should be picked up when filetype indent on is set in
vimrc.
-Arun
: (press \mm to start the game, after
sourcing the file)
http://www.vim.org/scripts/script.php?script_id=2541
Please send in your comments/suggestions.
-Arun
--~--~-~--~~~---~--~~
You received this message from the vim_use maillist.
For more information, visit http
38 matches
Mail list logo