Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [persistent-state]

The tag has no usage guidance.

0
votes
1answer
76 views

In Vim, how to tag/enrich buffers with custom information (that persist naturally)

Gday, 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 ...
1
vote
1answer
81 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 ...
1
vote
0answers
30 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 ...
4
votes
3answers
3k 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 ...
2
votes
2answers
135 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 ...
6
votes
4answers
387 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 ...
12
votes
5answers
492 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 ...
8
votes
2answers
226 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 ...
12
votes
1answer
166 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 ...
5
votes
1answer
73 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 ...
14
votes
3answers
2k 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 ...
13
votes
1answer
500 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 ...
52
votes
4answers
10k 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 ...
6
votes
1answer
1k 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 ...
32
votes
1answer
4k 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 ...