vim

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

Why does sudo change HOME directory to /root on some Linux distros but not others?

Why does sudo change HOME directory to /root on some Linux distros but not others? In troubleshooting vi, I noticed on my Ubuntu installation running the command sudo env | grep HOME returns the home directory of the user that runs the command (/home/USER). But I noticed on my Linux Mint installation running the command …

Total answers: 1

Vim: Is it possible to open multiple files and jump to specific lines?

Vim: Is it possible to open multiple files and jump to specific lines? Regularly, one may open one file "foobar" and jump directly to line M as such: vim +M foobar Now, I have a whole list of files "foobar1", "foobar2", …, "foobarN", all with different lines of interest M1, M2, …, MN. Is it …

Total answers: 1

How to set Vim as the default text editor in Linux (Ubuntu)?

How to set Vim as the default text editor in Linux (Ubuntu)? I found another way to set Vim as the default text editor in Ubuntu but I would like to know why this tutorial is not working for me: https://www.a2hosting.com/kb/developer-corner/linux/setting-the-default-text-editor-in-linux Here’s what I did: I edited ~/.bashrc by adding these 2 lines: export EDITOR=’vi’ …

Total answers: 2

Neovim open file with search pattern not escaped?

Neovim open file with search pattern not escaped? I’m trying to run the command: nvim "./some-file" ‘+/Text (with/slash)’ But I get the following error: Error detected while processing command line: E486: Pattern not found: Text (with And the command line arguments after running :exe ‘!tr "" " " </proc/’ . getpid() . ‘/cmdline’ gives me: …

Total answers: 1