>>On 02/23 11:11, Salman Halim wrote:
>> I actually prefer to never hit shift, so map ; to : instead.
>>
>On 2021-02-24, tu...@posteo.de wrote:
> Hi Salman,
>
> oh! :)
>
> The first is genious
Keep in mind that ; is a useful mapping in Vim. Sure, you can
On 02/24 08:59, aroc...@vex.net wrote:
>
> > the distinctive feeling of flat-hand-against-my-fronthead... ;)
> >
>
> Aka (Also known as:) a face-palm. :-)*
Ok :) another face-palm (this time correctly spoke...I am no native
speaker...sorry...
But...how can I ensure, that I am talking about my
> the distinctive feeling of flat-hand-against-my-fronthead... ;)
>
Aka (Also known as:) a face-palm. :-)*
--
--
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
"I use in much the same way and just call :update.* I also save
automatically when the Vim window loses focus*."
Tell me more about this.
On Wednesday, February 24, 2021 at 2:54:17 AM UTC-5 Salman Halim wrote:
> I use in much the same way and just call :update. I also save
> automatically
I use in much the same way and just call :update. I also save
automatically when the Vim window loses focus.
--
Salman
On Wed, 24 Feb 2021, 02:33 Tony Mechelynck,
wrote:
> P.S. My solution to a similar problem was a little different:
>
> map :wa|wv
> map! :wa|wv
>
> Best
P.S. My solution to a similar problem was a little different:
map :wa|wv
map! :wa|wv
Best regards,
Tony.
--
--
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
On Wed, Feb 24, 2021 at 5:06 AM wrote:
>
> Hi,
>
> if my PC is heavily compiling things and I am editing and saving
> things repeatedly if often hit :W instead of :w (that is, I am
> still pressing SHIFT when hitting w.
>
> So I tried to map :W to :w...but it does not work for me.
>
> I tried
>
>
Hi Salman,
oh! :)
The first is genious and while reading the second one I had
the distinctive feeling of flat-hand-against-my-fronthead... ;)
Of course!
Thank you very much! That helps me a lot!
Cheers!
mcc
On 02/23 11:11, Salman Halim wrote:
> I actually prefer to never hit shift, so map ;
I actually prefer to never hit shift, so map ; to : instead.
You could simply define a command called W to do what you want:
command! W w
--
Salman
On Tue, 23 Feb 2021, 23:06 , wrote:
> Hi,
>
> if my PC is heavily compiling things and I am editing and saving
> things repeatedly if often
Hi,
if my PC is heavily compiling things and I am editing and saving
things repeatedly if often hit :W instead of :w (that is, I am
still pressing SHIFT when hitting w.
So I tried to map :W to :w...but it does not work for me.
I tried
[n]map W w
and
[n]map :W :w
.
Is there any way to map
; :h v:count includes the following example
> > |
> > map _x :echo "the count is ".v:count
> > |
> >
> > which works as expected, but using
> > |
> > map :let @n=v:count1...
> > |
> >
> did you really leave out the left-hand-side of t
Hi,
Graham Lawrence schrieb am 19.07.2020 um 22:07:
> :h v:count includes the following example
> |
> map _x :echo "the count is ".v:count
> |
>
> which works as expected, but using
> |
> map :let @n=v:count1...
> |
>
did you really leave out the left
:h v:count includes the following example
map _x :echo "the count is " . v:count
which works as expected, but using
map :let @n=v:count1 ...
produces E492 etc; and instead I must use
map ;; :exe 'let @n=v:count1' ...
for it to work.
Now I have a number of mappings in alternate .vimrc files
On 2020-02-14, M Kelly wrote:
> Hi,
>
> ok, thank you.
> I always thought there had to be quotes around each block, as in () ? 'foo' :
> 'bar'
> So I was trying \' and \\' and \" and \\" and extra quotes for each additional
> nested block to no success.
> I will remove all quotes and see if I can
Hi,
ok, thank you.
I always thought there had to be quotes around each block, as in () ? 'foo'
: 'bar'
So I was trying \' and \\' and \" and \\" and extra quotes for each
additional nested block to no success.
I will remove all quotes and see if I can get it to work.
take care,
-m
--
--
You
On 2020-02-13, M Kelly wrote:
> Hi,
>
> Is it posible to nest conditionals in a mapping, something like, just for
> demonstration:
>
> vnoremap vv (strlen(@y) == 1) ? ':let ...' : '("vcl" =~
> getregtype("*"))
> ? 'some foo' : 'some bar' ' so
Hi,
I suppose I can call a function to do this :-)
-m
--
--
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
Hi,
Is it posible to nest conditionals in a mapping, something like, just for
demonstration:
vnoremap vv (strlen(@y) == 1) ? ':let ...' : '("vcl" =~
getregtype("*")) ? 'some foo' : 'some bar' ' some more ...
Can we do this ? Do I use ''' (3 single quotes) to embed qu
thanks. I am more interested to know why separate mappings don't work and
how to make it work, if possible.
this two key mapping will have complexity issue, since everything i* now
incurs a mapping, and the same issue (one key is subject to mapping and the
next one isn't) might manifest
noremap ur ip
--
--
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 Groups
"vim_use"
hi, I use colemak keyboard layout, and put many mappings in my vimrc to
simulate vim finger movements on the original querty layout. it mostly
works fine but there are some mappings don't work up to expectation and I
am trying to understand why. for example, if I have these mappings
noremap u
t; > > >
> > > > > > > /command
> > > > > > >
> > > > > > > After hitting Enter, the cursor will be at the start of "commands"
> > > > > > > on line 7 and the command line will contain this:
>
ne will contain this:
> > > > > >
> > > > > > /command [1/>99]
> > > > > >
> > > > > > After hitting 'n', the cursor advances to line 13 and the command
> > > > > > l
On 2019-09-04, Bram Moolenaar wrote:
> Christian wrote:
>
> > On Mi, 04 Sep 2019, Bram Moolenaar wrote:
> >
> > > Hmm, since nobody runs the tests manually that doesn't help much.
> > > How about using a screendump? That makes these things a lot easier to
> > > write.
> >
> > Okay, how about
Christian wrote:
> On Mi, 04 Sep 2019, Bram Moolenaar wrote:
>
> > Hmm, since nobody runs the tests manually that doesn't help much.
> > How about using a screendump? That makes these things a lot easier to
> > write.
>
> Okay, how about the attached patch then? That fails with v8.1.1965 and
On Mi, 04 Sep 2019, Christian Brabandt wrote:
> Okay, how about the attached patch then? That fails with v8.1.1965 and
> should work with v8.1.1970
Small update:
[...]
> + call delete('XscriptMatchCommon')
that should of course be
call delete('Xsearchstat')
Best,
Christian
--
Ein
On Mi, 04 Sep 2019, Bram Moolenaar wrote:
> Hmm, since nobody runs the tests manually that doesn't help much.
> How about using a screendump? That makes these things a lot easier to
> write.
Okay, how about the attached patch then? That fails with v8.1.1965 and
should work with v8.1.1970
Christian wrote:
> > > > > On Fr, 30 Aug 2019, Bram Moolenaar wrote:
> > > > >
> > > > > > Thanks. Yes, I think we should do this. But the allocation should
> > > > > > probably be done differently, it looks like with cmd_silent set it
> > > > > > still
> > > > > > computes the size of the
On Di, 03 Sep 2019, Bram Moolenaar wrote:
>
> Christian wrote:
>
> > > > On Fr, 30 Aug 2019, Bram Moolenaar wrote:
> > > >
> > > > > Thanks. Yes, I think we should do this. But the allocation should
> > > > > probably be done differently, it looks like with cmd_silent set it
> > > > >
Christian wrote:
> > > On Fr, 30 Aug 2019, Bram Moolenaar wrote:
> > >
> > > > Thanks. Yes, I think we should do this. But the allocation should
> > > > probably be done differently, it looks like with cmd_silent set it still
> > > > computes the size of the command. This will require some
a/src/testdir/test_search_stat.vim
+++ b/src/testdir/test_search_stat.vim
@@ -160,7 +160,27 @@ func! Test_search_stat()
let stat = '\[1/2\]'
call assert_notmatch(pat .. stat, g:a)
- " close the window
+ " normal, n comes from a silent mapping
+ " First test a normal mapping,
Christian wrote:
> On Fr, 30 Aug 2019, Bram Moolenaar wrote:
>
> > Thanks. Yes, I think we should do this. But the allocation should
> > probably be done differently, it looks like with cmd_silent set it still
> > computes the size of the command. This will require some more "if"
> >
On Fr, 30 Aug 2019, Bram Moolenaar wrote:
> Thanks. Yes, I think we should do this. But the allocation should
> probably be done differently, it looks like with cmd_silent set it still
> computes the size of the command. This will require some more "if"
> statements, but makes the size
Christian wrote:
> On Do, 29 Aug 2019, Gary Johnson wrote:
>
> > In fact, removing all the mappings and just executing Ctrl-E or
> > Ctrl-Y to scroll the window after a search erases the search count
> > message. I think that's a bug. I can see no reason why scrolling
> > should erase that
Christian wrote:
> On Do, 29 Aug 2019, Bram Moolenaar wrote:
>
> > The argument means that the command won't be echoed. But it
> > does not suppress the output of the command like the ":silent" modifier
> > does.
>
> Yeah, but it felt natural to me, to only show the search index feature,
>
On Do, 29 Aug 2019, 'Andy Wokula' via vim_use wrote:
> > nmap n nzv
> > nnoremap zv zv:call AdjCursor()
>
> :nmap n n(adj-cursor)
> :nnoremap (adj-cursor) zv:call AdjCursor()
>
>
> " first command can be written as:
> :nmap
On Do, 29 Aug 2019, Gary Johnson wrote:
> In fact, removing all the mappings and just executing Ctrl-E or
> Ctrl-Y to scroll the window after a search erases the search count
> message. I think that's a bug. I can see no reason why scrolling
> should erase that message unless scrolling moves
On Do, 29 Aug 2019, Bram Moolenaar wrote:
> The argument means that the command won't be echoed. But it
> does not suppress the output of the command like the ":silent" modifier
> does.
Yeah, but it felt natural to me, to only show the search index feature,
if the command is echoed. I
he cursor will be at the start of "commands"
> > > > > on line 7 and the command line will contain this:
> > > > >
> > > > > /command [1/>99]
> > > > >
> > > > &
uot;.
Another 'n' advances the cursor to line 17, the screen scrolls
up so that that line is at the bottom of the window, and the command
line is empty--no search count message at all.
I would think that would prevent the mapping from
disturbing the command line, in which case this is a bug.
If i
will be at the start of "commands"
> > > > > on line 7 and the command line will contain this:
> > > > >
> > > > > /command [1/>99]
> > > > >
> > > > > After hitti
[1/>99]
> > > >
> > > > After hitting 'n', the cursor advances to line 13 and the command
> > > > line stays the same, even showing "[1/>99]" when it should be
> > > > showing "[2/>99]".
&g
and line will contain this:
> > >
> > > /command [1/>99]
> > >
> > > After hitting 'n', the cursor advances to line 13 and the command
> > > line stays the same, even showing "[1/>99]"
you can use the mapping that I intended
> for you to use to demonstrate the problem, the one defined in
> test.vim.
>
> Regards,
> Gary
Ah, sorry. Well, with ":noremap n n" the count is indeed not
echoed, but with ":noremap n n" instead, it is. I suppose that the
to line 13 and the command
> > line stays the same, even showing "[1/>99]" when it should be
> > showing "[2/>99]".
> >
> > Another 'n' advances the cursor to line 17, the screen scrolls
> > up so that that line is at the bottom of the window
ces to line 13 and the command
> > line stays the same, even showing "[1/>99]" when it should be
> > showing "[2/>99]".
> >
> > Another 'n' advances the cursor to line 17, the screen scrolls
> > up so that that line is at the bottom of the w
or to line 17, the screen scrolls
> up so that that line is at the bottom of the window, and the command
> line is empty--no search count message at all.
>
> I would think that would prevent the mapping from
> disturbing the command line, in which case this is a bug.
>
> If it
ursor to line 17, the screen scrolls
> up so that that line is at the bottom of the window, and the command
> line is empty--no search count message at all.
>
> I would think that would prevent the mapping from
> disturbing the command line, in which case this is a bug.
>
> If
;99]" when it should be
showing "[2/>99]".
Another 'n' advances the cursor to line 17, the screen scrolls
up so that that line is at the bottom of the window, and the command
line is empty--no search count message at all.
I would think that would prevent the mapping from
disturb
at
> you want to map. If you see something, then that's what you can map. If
> not, vim isn't seeing the keys and has trouble mapping it. I see in
> gvim for alt+left.
>
> HTH, and regards, John Little
Yes, and in addition, sometimes (especially when running in a
terminal, bu
vim isn't seeing the keys and has trouble mapping it. I see in gvim
for alt+left.
HTH, and regards, John Little
--
--
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:
Hi Vim Users,
I am a vim user on Unix like machines but for my current project, I have to use
it on windows 10 machine.
how to map ALT+ LEFT | RIGHT | UP | DOWN keys in vimrc file?
currently, I using like this: nmap :wincmd k
Can anyone please suggest vim configuration on windows(including
Hi,
Chris Lott schrieb am 10.10.2018 um 21:05:
>
> I have a mapping in my .vimrc :
>
> nnoremap md :write:silent !open -a 'Marked.app' '%:p'
>
> When I invoke the map, my cursor in Vim moves to the beginning of the
> line. This doesn't happen if I run the commands manually.
I have a mapping in my .vimrc :
nnoremap md :write:silent !open -a 'Marked.app' '%:p'
When I invoke the map, my cursor in Vim moves to the beginning of the line.
This doesn't happen if I run the commands manually. Why does the cursor move
and how can I stop it from doing so?
Thanks
On 30/08/2018 20:37, Christian Brabandt wrote:
On Do, 30 Aug 2018, John Passaro wrote:
Could you implement the function and accompanying mapping as follows?
imap MyFunction("cr")
imap n MyFunction("Leader-n")
This is the typical workaround. The idea wa
On Do, 30 Aug 2018, John Passaro wrote:
> Could you implement the function and accompanying mapping as follows?
>
> imap MyFunction("cr")
> imap n MyFunction("Leader-n")
This is the typical workaround. The idea was to be able to know in the
function
Could you implement the function and accompanying mapping as follows?
imap MyFunction("cr")
imap n MyFunction("Leader-n")
Sorry if this is obvious, if it is impractical for some reason I'm curious
why.
John Passaro
(917) 678-8293
On Thu, Aug 30, 2018 at 1:18 PM, Chris
On Do, 30 Aug 2018, Lifepillar wrote:
> Is it possible to access the lhs of a mapping from its rhs?
> For example, given:
>
> imap MyFunction()
>
> is there a way for MyFunction() to know that it was called by ?
Not that I know of and I have whished for that before
Is it possible to access the lhs of a mapping from its rhs?
For example, given:
imap MyFunction()
is there a way for MyFunction() to know that it was called by ?
Thanks,
Life.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below th
Hi,
Assuming that the nomodifiable option is set on a buffer, I am trying to map
this kind :
nnoremap
Tried with :tnoremap? --Matteo
On Sun, Jun 17, 2018 at 3:52 PM, M Kelly wrote:
> > Is there a way to map keys only when in normal mode from a terminal ?
>
> Hi,
>
> I think something like this works -
>
> nnoremap( == 'terminal') ? 'i' :
> ''
>
> thx,
> -m
>
> --
> --
> You received this
> Is there a way to map keys only when in normal mode from a terminal ?
Hi,
I think something like this works -
nnoremap( == 'terminal') ? 'i' : ''
thx,
-m
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
Hi,
Is there a way to map keys only when in normal mode from a terminal ?
thx,
-m
--
--
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
(, 5, 2)
> > noremap :call smooth_scroll#down(, 5, 2)
> > endif
> >
> > but strangely it ignores the mapping if I load it like that. That
> > means the exists('g:loaded_smoothscroll') check failed, but doing an
> > :echo exists('g:loaded_smoothscroll') doe
ehaviour if
> the smooth scroll plugin isn't loaded.
>
> I've tried this:
>
> if exists('g:loaded_smoothscroll')
> noremap :call smooth_scroll#up(, 5, 2)
> noremap :call smooth_scroll#down(, 5, 2)
> endif
>
> but strangely it ignores the mapping if I load i
ed.
I've tried this:
if exists('g:loaded_smoothscroll')
noremap :call smooth_scroll#up(, 5, 2)
noremap :call smooth_scroll#down(, 5, 2)
endif
but strangely it ignores the mapping if I load it like that. That means the
exists('g:loaded_smoothscroll') check failed, but doing an :echo
exis
dmap
'.g:prv.paths.vim.'aux/PXmodmap2')
" Notes:
" - can I leave only the chars needed to swap in PXmodmap? e.g. only ; with :?
" - i should make this through the system.
as in:
https://github.com/ttm/prv/blob/master/vimrc
Em sábado, 19 de maio de 2018 23:18:42 UTC-3, Renato
mapping;
nn p; :cal system('xmodmap ~/.Xmodmap')
~/.Xmodmap created with -pke > aux/PXmodmap
and then swapping colon with semicolon
Ctrl+space swaps dead keys and not dead keys,
set by OS (ubuntu 16.04).
But
when swapping dead and no dead keys (c-space),
; is ; again, : is : again, an
Am 13.05.2018 um 22:24 schrieb M Kelly:
Yes, this is default behaviour on linux. You need to remap
first, then map .
thx so much
nnoremap
works great :-)
-mark
Same on Windows.
You don't need .
I'd rather map
:nnoremap
--
Andy
--
--
You received this message from the "vim_use"
> Are you in windows OS? If it is, it will confilct with windows OS shortkey.
Hi, no, sorry should have added that. I'm on Linux, Ubuntu 16.04 LTS +hwe
--
--
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
On Sunday, May 13, 2018 at 9:38:03 PM UTC+8, M Kelly wrote:
> Hi,
>
> Any idea why this doesn't work ?
>
> nnoremap :conf qa
>
> If I don't use the but some other non-ctrl char it works fine.
> I keep getting a msg:
>
> Type :qa! and press to abandon all changes and exit Vim
>
> On this
Hi,
Any idea why this doesn't work ?
nnoremap :conf qa
If I don't use the but some other non-ctrl char it works fine.
I keep getting a msg:
Type :qa! and press to abandon all changes and exit Vim
On this and also whenever I just type ctrl-c
thx,
mark
--
--
You received this message
I'm also disabled having cerebral palsy with reduced mobility in both hands
and arms. While most of my remappings probably won't help you one of the
things I've done might: I've remapped most of the commands to
{key} because it's hard for me to hold down two keys simultanously and
id out in relation to the keys I
was mapping so I could check my finger position literally at a glance. A
little dab of epoxy resin on F1 and F4 also helped me identify them by
touch (simulating the dots on F and J on most keyboards).
I also mapped the Leader to be the ` (backtick) character, as
On Fri, Mar 23, 2018 at 10:03 PM, Robert Bower wrote:
> I am a occasional Vim user. It is my default rescue editor and I use it for
> a few tasks but not many. I would like to use it for more because it is so
> customizable. What holds me back is I am a one handed left
On 2018-03-23 14:03, Robert Bower wrote:
> I am a occasional Vim user. It is my default rescue editor and I
> use it for a few tasks but not many. I would like to use it for
> more because it is so customizable. What holds me back is I am a
> one handed left handed touch typist. I only have
I am a occasional Vim user. It is my default rescue editor and I use it for a
few tasks but not many. I would like to use it for more because it is so
customizable. What holds me back is I am a one handed left handed touch
typist. I only have use of my left arm.
The problem I have with
Is there a simple way of mapping say ^[a - ^[z etc. to - etc?
--
--
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 messa
MyCR
Last set from ~/.vim/vimrc
First question: why are there two definitions instead of one? I.e., why
is the mapping from my vimrc shown at all?
Due to buffer-local mappings there may exist at most {number of loaded
buffers present}+1 mapping definitions, with buffer-local m
rc:
>
> imap MyCR (MUcompleteCR)
> imap MyCR
>
> Auto-pairs maps , too, and it tries hard not to override an existing
> mapping. After loading, :verbose imap shows this:
>
> i &@(MUcompleteCR)24_AutoPairsReturn
> Last set from ~/.vim/pack/bundle/start/au
not to override an existing
mapping. After loading, :verbose imap shows this:
i &@(MUcompleteCR)24_AutoPairsReturn
Last set from
~/.vim/pack/bundle/start/auto-pairs/plugin/auto-pairs.vim
iMyCR
Last set from ~/.vim/vimrc
I think auto-pairs expands the current mapping and app
I am trying to disable the default mapping for the tab key to @a in
command window. according to :h command-line-window, adding the following two
lines in .vimrc should do the job but it doesn't to my test.
au CmdwinEnter [:>] iunmap
au CmdwinEnter [:>] nunmap
below is the min repo v
ane
> > > in tmux.
> > >
> > > sudo tmux send-keys -t "1" C-z "test"
> > >
> > > I tried the following. wrote the above command in a test.sh file and made
> > > a mapping as below.
> > >
> > > :nnoremap x 'si
est"
> >
> > I tried the following. wrote the above command in a test.sh file and made a
> > mapping as below.
> >
> > :nnoremap x 'silent :!./test.sh'
> >
> > I'm getting the following error.
> >
> > E20: Mark not set
> >
> > i
On Wed, Nov 29, 2017 at 11:06:19PM -0800, sinbad wrote:
> I'm trying to map x in normal mode to do send a command to a pane in
> tmux.
>
> sudo tmux send-keys -t "1" C-z "test"
>
> I tried the following. wrote the above command in a test.sh file and made a
Hi,
I'm trying to map x in normal mode to do send a command to a pane in
tmux.
sudo tmux send-keys -t "1" C-z "test"
I tried the following. wrote the above command in a test.sh file and made a
mapping as below.
:nnoremap x 'silent :!./test.sh'
I'm getting the followi
Here is a mapping using q: that works, copies cursor WORD into @" and uses
it to build a substitute command in command line window, ends by waiting
for user to type a character the cursor should move back to.
nmap W yiWq:i%s/\<^R "\>/^R "/g^[ F
Note ^U ^R ^[ ^M are all t
nmap :exec "help " . expand("")
> >
> > and have been trying to develop similar do the option on the cursor
> > word, something like
> >
> > nmap \\ yiw:h ^R"^[
> >
> > but to no avail. Although the mapping does not termin
elop similar do the option on the cursor
> word, something like
>
> nmap \\ yiw:h ^R"^[
>
> but to no avail. Although the mapping does not terminate with a , vim
> treats the ^[ as if it were rather than and goes straight to the
> specific help for the cursor-word.
d, something like
nmap \\ yiw:h ^R"^[
But ^[ means Escape, not Tab,
and Escape, when used in a mapping, works like Enter (usually):
:h c_Esc
So you want (right?) which looks more like ^I, but anyway in a mapping you
can't use ,
instead you need to use the key defined with
:h 'wildcharm
I have the customary mappings for :help,
nmap :exec "help " . expand("")
nmap :exec "help " . expand("")
and have been trying to develop similar do the option on the cursor
word, something like
nmap \\ yiw:h ^R"^[
but to no av
Le dimanche 11 juin 2017 20:09:19 UTC+2, Ni Va a écrit :
> Le dimanche 11 juin 2017 18:35:59 UTC+2, Bram Moolenaar a écrit :
> > Ni Va wrote:
> >
> > > Trying this
> > >
> > >
> > > let file = readfile(expand("%:p"),'b')
> > > let g:file=map(copy(file),'v:val.":".index(copy(file), v:val)')
> >
Le dimanche 11 juin 2017 18:35:59 UTC+2, Bram Moolenaar a écrit :
> Ni Va wrote:
>
> > Trying this
> >
> >
> > let file = readfile(expand("%:p"),'b')
> > let g:file=map(copy(file),'v:val.":".index(copy(file), v:val)')
> >
> > returns -1 for each v:val of list 'file' out of 0, 1 , 2 etc..
>
>
Le dimanche 11 juin 2017 18:35:59 UTC+2, Bram Moolenaar a écrit :
> Ni Va wrote:
>
> > Trying this
> >
> >
> > let file = readfile(expand("%:p"),'b')
> > let g:file=map(copy(file),'v:val.":".index(copy(file), v:val)')
> >
> > returns -1 for each v:val of list 'file' out of 0, 1 , 2 etc..
>
>
Ni Va wrote:
> Trying this
>
>
> let file = readfile(expand("%:p"),'b')
> let g:file=map(copy(file),'v:val.":".index(copy(file), v:val)')
>
> returns -1 for each v:val of list 'file' out of 0, 1 , 2 etc..
Works fine for me (spaces added for readability):
let file = ['aaa', 'bbb',
2017-06-11 18:36 GMT+03:00 Ni Va :
> Hi,
>
> Trying this
>
>
> let file = readfile(expand("%:p"),'b')
> let g:file=map(copy(file),'v:val.":".index(copy(file), v:val)')
>
> returns -1 for each v:val of list 'file' out of 0, 1 , 2 etc..
There is `v:key`, do not use `index()`
Hi,
Trying this
let file = readfile(expand("%:p"),'b')
let g:file=map(copy(file),'v:val.":".index(copy(file), v:val)')
returns -1 for each v:val of list 'file' out of 0, 1 , 2 etc..
Thank you
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply
the lines, but what I got was everything up to
the comment, i.e., the last line had only the #endif. A new
uninstalled vim (without plugins) did what I had expected
originally.
After some debugging, what I found was that in this mapping in
matchit.vim:
onoremap % v:call Match_wrapper('',1,'o
dif //SOMETHING
>
> expecting to yank all the lines, but what I got was everything up to the
> comment, i.e., the last line had only the #endif. A new uninstalled vim
> (without plugins) did what I had expected originally.
>
> After some debugging, what I found was that in this
to the
comment, i.e., the last line had only the #endif. A new uninstalled vim
(without plugins) did what I had expected originally.
After some debugging, what I found was that in this mapping in matchit.vim:
onoremap % v:call Match_wrapper('',1,'o')
the 'v' in v: was changing the operator to forced
1 - 100 of 708 matches
Mail list logo