Skip to main content

Questions tagged [persistent-state]

Filter by
Sorted by
Tagged with
7 votes
2 answers
651 views

Possible to rename file and maintain undo?

Is there a way to rename/copy/move a file and maintain the vim persistent undo information? If I do :w new-file-name and then :e new-file-name I can't hit u to undo. Already at oldest change :-(
Alec Jacobson's user avatar
1 vote
2 answers
478 views

persistent_undo works for vimrc file, but not for other files

Are there any permission settings that need set on a file to get persistent undo to work? I close and open my vimrc file and I can keep hitting the u key to see my previous edits. But it does not work ...
MrSnrub's user avatar
  • 449
0 votes
1 answer
450 views

How to tag/enrich buffers with custom information (that persist naturally)?

I am trying to persist some state about my buffers, specifically terminal buffers, over vim sessions with :mksession through the plugin vim-session by Xolox. The goal is to assign labels to the ...
simlei's user avatar
  • 113
1 vote
1 answer
182 views

Local persistent undo file modeline

I have undodir=~/.vim/undodir such that persistent-undo history files don't clutter my source code directories. However, for one particular source file, I'd like to have its persistent-undo history ...
Evgeni Sergeev's user avatar
1 vote
0 answers
36 views

Keep buffer current without manual refresh? [duplicate]

Sometimes I'll edit a file I'm working on in another editor (don't ask) but it will be open in vim or vice versa. With vim I need to :e to force a refresh of the file. However in my other editors the ...
Meltemi's user avatar
  • 141
4 votes
3 answers
6k views

Where is my viminfo file on Windows?

I have gVim 7.4.608 installed on Windows 7 at work. I've looked in C:\ , C:\Users\<username>\AppData , C:\Program Files\vim , C:\Temp but there's no sign of it. It must exist somewhere, command ...
roblogic's user avatar
  • 707
2 votes
2 answers
152 views

How to add a string to cursor point of gvim through a shell script

When gvim is opened it saves the cursor position whether it is minimized or not. So I'm curious whether it is possible to add a string starting from the cursor blinking position by running a shell ...
ikisuru's user avatar
  • 23
6 votes
4 answers
687 views

How can I store a series of regular expression search and replace commands and run them later?

How can I store a series of search and replace statements so I can run them later in sequence? Possibly after I have close and re-opened vim... For instance I might run the following in sequence ...
leeand00's user avatar
  • 3,651
18 votes
5 answers
931 views

Can I be notified when I'm undoing changes from the undofile?

I've been using the undofile feature in Vim for a while now. It's a very nice feature. However, one annoyance is that it's very easy to accidentally undo changes that I did the last time I opened the ...
Martin Tournoij's user avatar
8 votes
2 answers
294 views

How to access recently used files by choosing from a list?

I would like to have a keystroke to show a list of recently used files to choose one to edit. What do I need to provide that? And related, How do I manage the history of recently used files ...
Volker Siegel's user avatar
12 votes
1 answer
367 views

Prevent Vim from recording events for certain filetypes

To add to this stackoverflow question, what should one put in their .vimrc to ensure 'private editing' of certain file extensions (e.g. .gpg files). Without compromising the effectiveness of the ...
jyalim's user avatar
  • 531
4 votes
1 answer
87 views

How do I get rid of <filename>.project.vim files?

It seems like any time I edit a file with gvim it creates a litany of files I don't want or seem to need. I understand the <filename>.~ files are backups of the file before I started editing and ...
Caleb's user avatar
  • 2,255
26 votes
4 answers
12k views

How can I clear a register/multiple registers completely?

I quite often use the :registers command to show the contents of all the registers (I forget what I put where, exactly what the role of "*, "., "%, etc. are). Especially because I set the " option in ...
Andrew Ferrier's user avatar
16 votes
1 answer
1k views

How is command history resolved between multiple instances of Vim?

Vim keeps a history of ex commands (accessible via :↑ and q:), and that history persists after quitting. If I run multiple instances of Vim (same user, same home directory), how does Vim arbitrate ...
200_success's user avatar
  • 9,629
78 votes
4 answers
29k views

How to save window, split, and buffer layout?

I have several tasks I am working on in one repository. I would like to create "workspaces" for working on them. One "workspace" or "buffer layout" would have all files I need to work on open in the ...
Nebril's user avatar
  • 3,547
8 votes
1 answer
5k views

How to cache file editing history in Vim, that it would not disappear after switching the file?

When I open another file in a Vim session all editing history for the other files disappears. Is it possible to configure Vim that it would automatically save and restore file editing history when ...
niekas's user avatar
  • 1,705
58 votes
1 answer
24k views

How can I use the undofile?

The last news item on vim.org talks about using the 'undofile' to save your history and undo changes even after a reboot: A feature I enjoy using myself is not known to many users, as I found out ...
user avatar