hkftwe
hkftwe

Reputation: 65

How use gvim command history?

When I close gvim, I can't press the up arrow to rerun the commands from my last vim session. How do I make it so that I can do this?

For example, I can type:

:set hls<CR>
:set<up arrow>

And I see:

:set hls

But when I close vim, typing

:set<up arrow>

does not show my last use of the set command.

Upvotes: 2

Views: 2030

Answers (2)

topsail
topsail

Reputation: 3119

After a new install of Xubuntu 13.10 I had no command history. But I noticed that my .viminfo file in my home folder was owned by root. Changing the owner and group of the file to my normal user fixed the problem.

Upvotes: 4

Jehu
Jehu

Reputation: 61

You coud try ''set history=[number]'' in .vimrc Here is my configuration:

set history=50
set viminfo=%,'20,/100,:100,<500,f1,n~/.vim/viminfo

History is persistent now even when you close and reopen vim.

Upvotes: 1

Related Questions