vim

How to make sed "silent" in a vim script?

How to make sed "silent" in a vim script? This vim script make its work #!/usr/bin/vim %!sed ‘s/ .*//’ %!sort -fu norm dd % norm $D The only problem is this message at the end (i have to press ENTER in keyboard) "20 lines filtered 20 lines filtered Press ENTER or type command to continue …

Total answers: 1

E325 Error with permission denied while deleting

E325 Error with permission denied while deleting I have this message on Linux Mint: 325: ATTENTION Found a swap file by the name "/etc/default/.grub.swp" owned by: root dated: Fri Mar 29 17:37:00 2024 file name: /etc/default/grub modified: YES user name: root host name: ilugu-ThinkPad-X220 process ID: 22737 While opening file "/etc/default/grub" dated: Fri Mar 29 …

Total answers: 2

Why does typing 'q' exit vim? (.man file)

Why does typing 'q' exit vim? (.man file) When I type the character q on my keyboard in vim, it exits vim. Why? Today I tried it edit a file with the file extension .man. I wanted to edit the file with a macro, so I tried to type qq — but when the first …

Total answers: 1

Intermittent lag in command terminal?

Intermittent lag in command terminal? I have a workstation that we run numerical simulations on using in-house code, submitting jobs from the command line and using vim to edit/view files. My problem is that whenever we are running at least one job (not even up to full capacity of CPUs available), we see intermittent lag …

Total answers: 1

Vim enable Ctrl+Shift+C

Vim enable Ctrl+Shift+C So…I’m using Vim (in the terminal, not any sort of other gui; whenever Vim is used by itself, assume it’s terminal vim). Vim is decent, I actually don’t find the learning curve to be too bad. I’m a bit less efficient than I would be in a normal text editor, though, primarily …

Total answers: 1

Vim does not display other files in the same folder when opening a file

Vim does not display other files in the same folder when opening a file On a brand new debian installation, when no ~/.vimrc is present, vim shows all files in the current directory when trying to open another file for editing in normal/command mode, as shown below: However, when a ~/.vimrc is present, even an …

Total answers: 1

Can a file be closed in vim without exiting?

Can a file be closed in vim without exiting? I have a file open in vim, and I have finished my edits. Is there a way for me to close the file (or buffer) so that the vim screen is blank? Asked By: Seamus || Source That would be :bd. :help :bd in vim 8.2 …

Total answers: 2

yamlfix not using configuration + (neo)vim usage

yamlfix not using configuration + (neo)vim usage I’m using yamlfix with ale in vim. I followed these steps because I wanted to remove the automatic "—" adding on top of the file every time I save my work (and some others default configurations). For some reason, the file is correctly fixed, but my configuration is …

Total answers: 1

Vim keeps resetting textwidth to 0, why?

Vim keeps resetting textwidth to 0, why? I am trying to understand why VIM keeps resetting my textwidth to 0. To create the problem, I open a new file in Vim, and I type: :set textwidth=72 I then enter a sentenace or two and I can see that it’s ensuring the width of the text …

Total answers: 1

.vimrc file not working

.vimrc file not working I have the following short and simple .vimrc file that I’ve started as I begin to learn and write my own .vimrc: 1 set number 2 3 highlight GoComment xtermfg=blue 4 5 syntax on However, when I try to source it, I get the following: Error detected while processing /home/matt/.vimrc: line …

Total answers: 1

Using vim, how do I fix word wrapping with leading comment markers like #

Using vim, how do I fix word wrapping with leading comment markers like # How do I fix the word wrapping in the following text, so that the comment # characters are also fixed up? Given this: # This is documentation # that # is very helpful. Lorem ipsum dolor sit amet, consectetur adipiscing elit. …

Total answers: 1

tying together the 'xxd' command with output

tying together the 'xxd' command with output I have the following hex dump: 00000000: 2345 5854 5241 530a 0a31 2e20 746f 2061 #EXTRAS..1. to a 00000010: 6464 2075 7365 723a 2060 7375 646f 2075 dd user: `sudo u 00000020: 7365 7261 6464 205b 7573 6572 6e61 6d65 seradd [username 00000030: 5d60 2061 6e64 2074 6865 …

Total answers: 1

How can I copy and paste outside of Neovim?

How can I copy and paste outside of Neovim? I wanted to copy some code I have from Neovim to Firefox, but the stuff I yanked doesn’t carry over outside Neovim. After I checked :checkhealth, this what it said: What should I do to handle this issue? Asked By: Vegeto.T || Source In order to …

Total answers: 3

How to force write (`:w!`) and quit (`:q`) vim in the same command?

How to force write (`:w!`) and quit (`:q`) vim in the same command? How can I force write (:w!) and quit (:q) vim in the same command? I try :w!q but that doesn’t work. Asked By: a06e || Source The vim idiom is :wq!. Another read of man vim is indicated. Answered By: waltinator As …

Total answers: 2

Calling vim in subprocess after running cat

Calling vim in subprocess after running cat I am trying to create a bash function vim_run which operates as follows: user pipes command output into vim_run user can edit output user exits vim and the contents of that buffer are now executed via source file This flow is useful for editing a list of files …

Total answers: 1

jump back into vim directory browser after closing a file

jump back into vim directory browser after closing a file vim is able to open directories (and then browse in them). vim roles/webservices/tasks/ " ============================================================================ " Netrw Directory Listing (netrw v156) " /home/gwagner/repos/automation_postgres/roles/webservices/tasks " Sorted by name " Sort sequence: [/]$,<core%(.d+)=>,.h$,.c$,.cpp$,~=*$,*,.o$,.obj$,.info$,.swp$,.bak$,~$ " Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:special " ============================================================================== ../ …

Total answers: 1

How to make vim cursor to be in central line always?

How to make vim cursor to be in central line always? I want to make my vim to behave in such a way as after each command there is a trailing zz command. Asked By: Eimrine || Source The scrolloff (so) option is documented like this in Vim (:help ‘scrolloff’, with my emphasis below): Minimal …

Total answers: 1

YANKING in Vim and Bash – are they opposite?

YANKING in Vim and Bash – are they opposite? I have a very short question that I couldn’t really find anywhere else upon googling, though to me this feels like a very natural question to ask, so maybe it’s just I’m missing out on something. So the word YANK feels like it means the opposite …

Total answers: 1