Questions tagged [vim]

vim (Vi IMproved) is a text editor supporting different editing modes.

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

Refresh Termite after being resized in Tiling WM

My goal is to create an instance of termite with vim running in it. I opted for sxhkd an created a simple configuration file: # My Simple X HotKey Daemon Configuration File super + v termite --exec &...
0
votes
0answers
10 views

Scroll, instead of move cursor, if at end of file

I find myself unintentionally hitting j (or some other downward cursor movement key) when I'm at the bottom of a file. Then the next thing I do is to hit Ctrl-E to scroll the current line up - I may ...
0
votes
1answer
28 views

Setting EDITOR variable causes “E886: Can't rename viminfo file” when editing Crontab

I use Vim as my editor. I wanted to have syntax colouring when editing Crontab with crontab -e. I followed this answer. After setting variable EDITOR=vim and exporting it crontab -e now shows syntax ...
0
votes
1answer
44 views

What’s most simple way to sync ~/.vimrc?

I’m using SSH and Bash more and more. I continue to train with vim to improve automation. Customizing the configuration file ~/.vimrc greatly helps. I am very interested in the question: Is it ...
3
votes
0answers
81 views

Strange “uneditable” symbols on specific linebreaks in vim, Debian 10 (Pic)

In all files I open with vim, I see a strange 1/2 symbol showing up on the second line, but only if the second line contains a unix linebreak. It always appears on line 2 of the file. The character is ...
1
vote
0answers
19 views

Mapping of { and } does not work in chain commands like `di{`

I mapped the following and tried with either and both mappings activated in hope to cover all vim modes: map! ĸ { map ĸ { The mapping works in insert mode and in normal mode as expected, but when I ...
0
votes
1answer
32 views

Colorscheme in Vim not correct colors

I downloaded this colorscheme here https://vimcolors.com/1199/pulumi/dark But this is what my Vim ends up looking like after applying it. I know it is definitely being applied because my colors ...
0
votes
0answers
17 views

Nvim: Warning: Cannot find word list “cz.utf-8.spl” or “cz.ascii.spl”

When I turn on spell checking for Czech language, this happens: :Sccz No spell file for "cz" in utf-8 Download it? Downloading cz.utf-8.spl... :!curl 'http://ftp.vim.org/pub/vim/runtime/...
0
votes
0answers
17 views

Proper pasting from clipboard doesn't work in st (simple terminal)

If you are wondering you had seen the same question on r/suckless on reddit, I am the same person and upon getting no satisfactory answer I decided to post it here. I am trying to patch st to have ...
0
votes
1answer
32 views

Disable auto tabs when putting your first comment in a yaml files with VIM editor?

Example of text before changes: First line Second line Third line When you put a comment on a line it will auto tab once that line. This happens every time you switch from ESCAPE mode to INSERT mode ...
0
votes
1answer
54 views

Configuration file for shell script?

Is it possible to define a configuration file for zsh scripts? I am running macOS 10.15 and the default shell is zsh. I have defined, i.e., alias abc="echo yes" in ~/.zshrc, ~/.zsh_profile, ~...
0
votes
1answer
31 views

Remap <leader>q to exit vim

I'm relatively new to vim rebinds; I am trying to map <leader>q to exit vim, but the following rebind does not seem to work: map <leader>q :q<cr> However, all of the following seem ...
1
vote
1answer
30 views

How do I properly convert the file to UTF-16LE encoding without strange characters appearing in the file?

I'm having some peculiarities with the dictionary file of .dsl format I'm trying to convert. It's essentially a text file with the dictionary pairs. The dictionary software I use is GoldenDict. It ...
5
votes
3answers
398 views

Reliable way to open files given by the result of find … -exec grep … {} \+

I often run commands like this: find … -exec grep … --color=always -l {} \+ and sometimes I need to open the matching files in Vim. But what is the most reliable way to do so? One way seems to be vim ...
0
votes
1answer
23 views

neovim: writes ^I instead of tab

I tried plugin vim-indentguides and did not work well so I decided to remove it using Plug. After uninstall is nvim writing ^I instead of tabs. How can I fix it ? Here is my init.vim and demonstration ...
2
votes
0answers
92 views

Vim-based alternative for Emacs tramp-mode

I'm currently using vim (actually neovim) as my IDE for writing and executing GNU R-code (using the Nvim-R-plugin, see also https://github.com/jalvesaq/Nvim-R, which serves as my REPL), which works ...
1
vote
3answers
122 views

How to edit a text file without a text editor?

I found myself in a situation, where I needed to connect to a remote machine there were no text editors installed (no vi or nano). The only way to edit text files is to use echo and cat. Can you ...
0
votes
1answer
26 views

How can I make vim only write to file after buffer has been modified?

I have this function which sources my .zshrc only if it has been modified in vim but I recently reinstalled Windows and WSL and then used my old .zshrc and .vimrc to get my setup back but this ...
3
votes
1answer
42 views

How to make vim recognize the script type and turn on autoindent and syntax highlighting, without needing to save and reopen file?

I don't save my shell scripts with a .sh extension. So when i launch a new file with vim using vim <filename>, it identifies the script type by reading the shebang. Naturally, this only happens ...
0
votes
0answers
15 views

Issue launching vim using xargs -r on a fzf result [duplicate]

I think I am misunderstanding something in the Linux piping with respect to xargs -r in combination with fzf. In my bashrc I have the function ef () { fzf | xargs -r -I vim } But written like ...
1
vote
1answer
44 views

How can I launch fzf inside vim and open the selected file on a split window?

How can I launch fzf inside vim and open the selected file on a split window? I don't want to install any plugin. I tried :!a=$(ls | fzf) && vsplit $a
0
votes
1answer
26 views

NeoVim - Strange colours in svn ci

I am using neovim as my standard editor on my system. But when I do a check in, it shows the first two lines in strange colours. Why is that and how can I change it to normal? Thanks in advance.
0
votes
1answer
55 views

iterm2 - vim is printing line numbers while scrolling

In iterm2, while scrolling in the vim I see a strange behavior. Whenever I am scrolling it is printing line number with scrolling. How to overcome from this behavior call-hometic_scale_1.txt" ...
1
vote
0answers
60 views

In zsh vim mode, when replacing multiple characters, backspace does not work as expected

I want to do the following: In the console, in vim mode, replace several characters (vim command R), while being able to revert the changes with backspace. In bash it works the same as in vim: bash ...
0
votes
3answers
25 views

Why can't I run Vim 8.2 from the LXDE menu?

I uninstalled Vim 8.0 with sudo apt remove vim-common, and compiled and installed the latest version: git clone https://github.com/vim/vim.git cd vim/src make sudo make install I can run Vim 8.2 ...
0
votes
3answers
107 views

Why can't remove vim?

uname -a Linux MiWiFi-R3-srv 4.19.0-0.bpo.9-amd64 #1 SMP Debian 4.19.118-2~bpo9+1 (2020-05-20) x86_64 GNU/Linux sudo dpkg -l vim Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-...
0
votes
1answer
134 views

How do I open files in a new tab from :Lexplore in VIM

When using netrw as :Lex, opening a file simply replaces the current file open. How do I open a file in a new tab from Lex or in a new vertical split?
-1
votes
1answer
39 views

Terminal isn't reset to previous state when quitting a man page or vim on XFCE [duplicate]

I use XFCE and its built-in terminal on FreeBSD. When I view a man page and then quit it - by pressing Q - the contents of the man page stay in the terminal. In a GNOME terminal that doesn't happen: ...
-3
votes
1answer
44 views

How to import tmux setting for vim to normal vim?

When using tmux my color/font/syntax highliting in VIM gets improved. How can i import that red/yellow/white combination of color in .vimrc file. I want that. VIM ON TMUX: AND THIS IS MY NORMAL UGLY ...
0
votes
1answer
90 views

What is the encoding format of a binary file(OBJ file,a.out,ELF etc..) [closed]

When I open a binary file in vim, I see the mnemonics instead of the 0s and 1s. I believe this is due to the fact that vim by default opens the file in ASCII mode. Is my understanding right? What is ...
0
votes
3answers
80 views

Creating vimrc breaks vim

I'm currently logged into a server via ssh with ssh -Y and running a tmux session. If I start vim and run :colorscheme elflord the color scheme is changed. (Although the colors are not exactly what I ...
0
votes
2answers
51 views

shell globbing to open all files with vim not working as expected

I'm trying to open and edit a series of files with vim. My expected behaviour, is that vim opens one file, I edit it, type :wq, vim closes and saves that file, and then immediately opens the next file ...
0
votes
2answers
42 views

crontab -e with jump to line option?

My $EDITOR is vim and when launching vim the direct way, you can jump directly to what you are interested with the +/ option. For example: vi /var/spool/cron/crontabs/root +/rsync But using the ...
1
vote
1answer
134 views

How do I compile vim with +clientserver on arch linux?

I am trying to use vim to edit TeX files with vimtex. I would like to be able to do backwards search from compiled PDFs. The vimtex documentation says the following: |+clientserver| is necessary for ...
3
votes
2answers
52 views

Is there a way to make vim run the “make” command in another terminal window?

I mainly use vim as an editor for C/C++ programming. Unfortunately, I'm not quite satisfied with the way my build process works. I know that it's possible to type in (or map to a key) :make to run the ...
0
votes
1answer
20 views

Vim edit file listed in current buffer

If I have opened in vim a file with the following contents foo.html bar/baz.html I currently have to type :e bar/baz.html to open that file for editing. I'd prefer to have a command that ...
0
votes
1answer
25 views

How to use a series of commands on vim

Hi guys in the terminal I use the command cat file.txt | sort | uniq -c . First I would like to use that command on vim and save the output to another file without the output being print when I run ...
1
vote
3answers
52 views

How to replace a pattern in brackets Using Vim editor

Having a file with two feilds which is :(colon) delimited as shown below: Ram:con_[3:4]_aen[52:7] Rakesh:sync[0:128] I need to convert the :(colon) using vim editor which is in brackets [] to ! as ...
1
vote
3answers
563 views

GNU Octave: `sh: vim: command not found`

I am running GNU Octave from flatpak and I have an issue with the edit command. In Octave's CLI when I run edit file.m I got the following issue: sh: vim: command not found I have the following set ...
-1
votes
2answers
64 views

How to remap characters like in vim but in the entire OS?

In my vim instead using hjkl to moving I use Alt Gr+(wasd) (like in a game but enabling it with Alt Gr) and I love it, please don't try to convince me that is bad idea, it is not the case. In fact, as ...
0
votes
0answers
38 views

How to copy full vim/vi remote file content to my local clipboard

I am having a file in the remote machine ( connected with customized ssh not Normal ssh ) .I do not have a way to copy/move the file to my local ( No scp allowed and no other connectivity ) .I am ...
0
votes
1answer
28 views

Converting colo schemes to different applications

Do you know about Project Dracula? https://draculatheme.com/ Dracula is a project where a initially zsh color theme is ported to over 100 different applications. I love this project, i think it's a ...
-1
votes
3answers
132 views

vi, or vim, on Centos7, overwrites the previous 30 lines in my bash window and thus those line are lost forever

I'm running Centos7 with TERM=linux. Whenever I open a file with vi, or vim, the previous 30 lines in my bash window are over written. vi works fine, but when scrolling back, those 30 lines are lost ...
-1
votes
1answer
21 views

How to make undo history interoperable between emacs and vim?

Is it possible to share undo history of a file between emacs and vim? I think it can be very useful: for example if your emacs config is broken and you want to quick edit files with vim to repair it.
0
votes
1answer
117 views

I've broken vi (E576: viminfo: Missing '>' in line:) - how do I fix it?

I am very much new to Debian, and have been using vi/vim to harden my SSH settings under sshd_config. Recently I've had a persistent error message: E576: viminfo: Missing '>' in line: I've ...
1
vote
2answers
52 views

How to execute function within double quotes?

I have these function: #execute vim and then exit on err return ve() { vim "$@" || exit } export -f ve #compile c source -> asm source in new tab in xfce terminal casm() { [ -z ${1} ] &&...
0
votes
1answer
86 views

Remap CapsLock and make it not lock capital letters

I wanted to remap CapsLock to work as escape, and I did it. What I did was: setxkbmap -option caps:escape But that method has a problem. Whenever I press CapsLock, on top it of working as escape, it ...
1
vote
1answer
34 views

Vim Plugin - Easymotion isn't starting automatically

I'm trying to improve my neovim with plugins and the best plugin that I found is Easymotion. However, it do not start automatically. I need to do :source ~/.vimrc every time that I launch a file. How ...
0
votes
0answers
21 views

Vim and Tmux doens't fit with each other

My colors breaks on tmux and i tried almost everything i could find on the web, NONE of them should actualy solve this problem. This is my colors inside tmux im using the default vim theme but all ...
0
votes
1answer
83 views

how to keep stty sane after piping strace to vim?

this makes vim madness: $strace -o >(vim -; stty sane) file.out; stty sane I have typed stty sane in processed substitution as well as in next command but none of them did their job. Once i piped ...

1
2 3 4 5
33