vim: input line history

238 views
Skip to first unread message

ping

unread,
Aug 7, 2012, 5:06:05 PM8/7/12
to vim-use Mailingliste, Ingo Karkat

experts:

just curious about:
how to display the contents that I input previously
so I may just call them easily , just like the way I search my cmd
history and re-use it...

b.t.w c-r & c-a are not what I need.

//this is vim help:
:his[tory] [{name}] [{first}][, [{last}]]
List the contents of history {name} which can be:
c[md] or : command-line history
s[earch] or / search string history
e[xpr] or = expression register history
i[nput] or @ input line history <----
d[ebug] or > debug command history
a[ll] all of the above

so looks :his i is what I need, but

//what are these?
:history @
# input history
1 \<0xFE686\>
2 \<0x0000269c\>
3 269c
4 f18628
5 \<0x00f185b8\>
6 f185b8
7 \<0xf185b8\>
8 269c\|\<0x00000b73\>
9 \<0x8027bc20\>
10 1217
11 iif
12 \<0x0027ee80\>
13 \<0xc027ee80\>
14 \<0x8026c398\>
15 \<0x0026f218\>
16 \<0x269c\>
17 \<0x04fa\>
18 04fa
19 \<0x40915860\>
> 20 1\.0\.0\.202\.



I don't think I "input" these... instead these looks the "search"
history that I ever used with Mark plugin (Ingo Karkat), to highlight
some numbers.
http://www.vim.org/scripts/script.php?script_id=2666

copy Ingo in case the mark plugin are related to my issue here...

Ben Fritz

unread,
Aug 7, 2012, 5:35:53 PM8/7/12
to vim...@googlegroups.com, Ingo Karkat
I would guess that plugin uses the input() command to get strings from the user to search for.

This is what is meant by "input line history". What did you think it meant?

ping

unread,
Aug 8, 2012, 11:14:59 PM8/8/12
to vim...@googlegroups.com, Ben Fritz
On 8/7/2012 5:35 PM, Ben Fritz wrote:
> I would guess that plugin uses the input() command to get strings from the user to search for.
>
> This is what is meant by "input line history". What did you think it meant?

hi Ben:
thanks for the response.
I thought it meant : a list texts that I typed in whenever I dropped
into insert mode and typed by my hand ...

for example:

I open vim and typed:
iI'm a beginner<esc>ibut I'm not a good learner<esc>

after that I type:
:his i

my expectation is I will get what I previously input as a list:
1. I'm a beginner
2. but I'm not a good learner

so looks I misunderstood this :history i

regards
ping

Ben Fritz

unread,
Aug 9, 2012, 10:38:58 AM8/9/12
to vim...@googlegroups.com
I see. So in response to your original question, I don't think there's a way to recall and repeat arbitrary changes you've made in the past.

But you can at least see all the changes you've made:

http://vim.wikia.com/wiki/Using_undo_branches

ping

unread,
Aug 10, 2012, 3:21:37 PM8/10/12
to Ingo Karkat, vim-use Mailingliste
got it Ingo, thanks for the explanation.

regards
ping

On 08/10/2012 03:05 PM, Ingo Karkat wrote:
> Hello ping,
>
> On 07-Aug-2012 23:06:05 +0200, ping wrote:
>
>> [20 lines deleted]
> By default, the Mark plug indeed adds the highlighted text to both input and
> search history. I don't particularly like this functionality, but it was in the
> original plugin that I took over. Just put
> let g:mwHistAdd = ''
> into your .vimrc to turn it off.
>
> By default, any marked words are also added to the search (/) and input (@)
> history; if you don't want that, remove the corresponding symbols from:
> let g:mwHistAdd = '/@'
>
> -- regards, ingo
>

ping

unread,
Aug 13, 2012, 11:05:13 AM8/13/12
to vim...@googlegroups.com, Ben Fritz
thanks that looks a good plugin to have!
Reply all
Reply to author
Forward
0 new messages