Skip to main content

Questions tagged [edit]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
3 answers

Problem using the edit command in a function defined in vimrc

I am attempting to write a vim function that I would like to be loaded automatically when vim starts, thus I am putting it in my vimrc (but maybe that is wrong?). When called during normal editing, it ...
efru's user avatar
  • 13
1 vote
2 answers

Restore auto-loaded file that was lost by accidently undoing edits

I accidentally removed about 1 hour of my work, how to restore? Last week I worked with on my current computer and didn't save it into disk but just put my OS into a sleep mode. Yesterday I ...
Artyom's user avatar
  • 127
0 votes
1 answer

How to traverse folders in :edit command dropdown menu

When opening a new file I use :e <tab> then a dropdown appears showing files in the PWD, I can move up and down with <tab> and <shift>+<tab> Pressing <enter> accepts the ...
Susensio's user avatar
  • 103
0 votes
1 answer

Vim normal mode: Is there a way to explain the changes in behavior with the D (shift + d) command?

Normally, hitting Shift d erases everything from the cursor to the end of the line, but sometimes it just deletes one character backwards. This has happened more than once, but a recent example is ...
user avatar
0 votes
2 answers

How to select all text and delete in vi?

Is it possible to select all the text and delete it it in vi other than hitting backspace?
kraber's user avatar
  • 1
2 votes
1 answer

How to :edit executable from path?

Environment: Linux I apologize in advance if this question already exists somewhere and has a proper answer. It is just so difficult for me to search because the keywords are all so generic. Put ...
Josh Thies's user avatar
5 votes
4 answers

How to clear a line in Vim

I want to achieve the same thing as S ESC without entering insert mode. Is there a way to do this? The best I've come up with is d$, but then you have to make sure you're at the front of a line which ...
mcp's user avatar
  • 169
2 votes
1 answer

VIM error: WARNING: The file has been changed since reading it!!! How to view the changes VIM is complaining about?

Is there a quick way to see the differences VIM is describing?
squarebase's user avatar
1 vote
2 answers

Open buffer without loading ftplugins

I have huge file and quite slow plugin (loaded by vim-plug) for corresponding filetype. I want following: Plugin is loaded by default Option to fast open this file without loading plugin. Something ...
petRUShka's user avatar
  • 243
1 vote
2 answers

Reloading buffers silently after an executed script changes the underlying files directly

I'm wrapping a command line script in a function and then in a command, which supplies this script with 2 arguments: nnoremap <leader>G :BxSedRi 'src/', 's/\<<C-r><C-w>\> ...
Petr Skocik's user avatar
1 vote
2 answers

How to add several empty lines without entering insert mode? [duplicate]

Sometimes I want to add several empty lines for better visualization. Now I end up clicking o<Escape> multiple times. I would love to reduce number of clicks by using something like 7o instead, ...
niekas's user avatar
  • 1,625
3 votes
1 answer

W11: File has changed since editing started

When a file is changed (e.g. by checking out another git branch), and i reload it with :bufdo e, I get the message W11: Warning: File "" has changed since editing started See ":...
WalksB's user avatar
  • 517
3 votes
1 answer

Why is oldfiles not listing last edited file

I use vim in the following way: I open vim. Then I press i to start writing. Then I save the buffer and give the file a name by issuing the command :w some-file-name.txt Then I quit vim by :x Then ...
L Kiil's user avatar
  • 33
0 votes
0 answers

vim: is possible to use mouse to move lines around

Question: Is possible to use mouse to move lines around? Requirements & Clarification I do know keyboard solutions. normal mode ddp d2j'}p dapggp alike. cmdline commands, :co. '<,'>m'a etc....
qeatzy's user avatar
  • 968
0 votes
1 answer

How to temporarily disable deleting and editing? [closed]

I sometimes use vim for brainstorming and writing first drafts and would like to be able to temporarily disable the ability to delete or edit what I write down. Is there anyway to do this natively in ...
Dianne's user avatar
  • 149
3 votes
1 answer

What is the difference between :find and :edit

:find and :edit both edit files and appear to need the relative or absolute path provided if the file isn't in the current directory. What is the extra part that :find brings? What is 'path'? Help ...
htoip's user avatar
  • 133