Questions tagged [vim]

Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor.

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

Do not change tabs on file re-open with Vim NERDTree

This is similar to NERDTree: open file in current window? in setup, but different in intent. Sequence of events: I have a tab in Vim (v8.1) with a window that has a buffer open for a particular file....
0
votes
0answers
15 views

How do I execute a Vim selection or range in bash without replacing it?

I have the same question in this post. How can I execute a Vim selection or range in bash without replacing it? But the accepted answer in this post, didn't work for me. The command isn't picking up ...
1
vote
1answer
17 views

my WSL ubuntu vi editor screen is broken when I scroll down

When I scroll down at my vim editor, all of my codes is wrapped with strange boxes. Can I fix it? My .vimrc file: Problem Image:
0
votes
1answer
13 views

The file was a text file but is attempting to be run as an executable - installing vim

I am trying to install vim using chocolately PS C:\opt1\abc> choco install -y vim Chocolatey v0.10.15 Installing the following packages: vim By installing you accept licenses for the packages. ...
1
vote
0answers
13 views

Vim has started adding commas unnecessary places [migrated]

When I use :w to save my JSON file, vim automatically adds some commas at syntactically significant (?) places.  It does not happen when I use :x or ZZ.  This started today.  I did not change anything ...
0
votes
0answers
9 views

How can I use :perldo in vim on Windows?

I installed Git Bash and vim was pre-installed. I personally would rather use PCREs instead of vim's regular expressions, so I tried doing :perldo /s/foo/bar. The error was that it could not find msys-...
0
votes
0answers
35 views

Accidentally recovered the wrong file with vim

I coded some stuff in Pluma and later forgot that i worked on it and turn my raspberry pi 3 off (Ubuntu mate 16...) After that i saw that i lost some code and it really didnt matter so hard. I wanted ...
0
votes
0answers
56 views

No color in vim with SSH on Linux server

At work, I use SSH to remotely connect on servers to edit files. As I got quickly bored of vi, I built a local vim, years ago, and everything worked fine. As my profile is shared between almost all ...
1
vote
1answer
66 views

How to set up the *NIX terminal to function similar to an IDE?

I would like to set up something in a shell to give me an IDE-like experience using only the shell (no X). The closest I have come is using tmux, with vim in one pane and the command line in the ...
1
vote
0answers
18 views

How to set LaTeX syntax to “ConTeXt” in vimrc [migrated]

TL;DR: How do I permanently and persistently :set syntax=context for *.tex files? I've been using vim for a LaTeX project, with monokai-tasty as the colour scheme. The default syntax highlighting ...
0
votes
1answer
36 views

vim mapleader is not working as it should

I have set the mapleader in vim as following let mapleader = "," when I try :echo mapleader it shows , correctly however the following does not work nnoremap <leader>a :echo("\<leader\...
-1
votes
0answers
11 views

Spacevim Freezing after a “.”

When using Spacevim and writing python code I find that at seemingly random times shortly after (one to three characters after) typing a "." Spacevim and the terminal instance (other tabs not being ...
4
votes
1answer
63 views

How to abort vim opening a large file?

When opening a very large file vim will sometimes take a long time and just show the black screen while it loads. Sometime I change my mind after opening and want to return to the command line without ...
2
votes
0answers
16 views

Why is accessing the X server locally from vim so slow?

I'm having problems with slow startup time in vim. I used the --startuptime flag to investigate, with the following output: times in msec clock self+sourced self: sourced script clock ...
0
votes
0answers
14 views

How to block mouse and arrows in Vim?

I kinda started right now with Vim... So, I'm using Janus and enjoying it. But it let me use the arrow keys. How can I block them? I would also like to disable completely the mouse. (make it desappear ...
1
vote
0answers
50 views

Urxvt with weird colors in Vim

I installed Urxvt on Ubuntu 18.04 to test it and when I opened Vim I saw the weird colors on the left, when it should be as shown on the right:    I tried to change the color scheme, I set the t_Co=...
0
votes
0answers
26 views

NerdTree/Vim Directory icons are ugly capital ^G's instead of + signs

As you can see in the picture. I did a fresh install of nerdtrees, a plugin for vim, that allows you to navigate the filesystem without exiting vim. The intended icons for the file system navigation ...
1
vote
0answers
36 views

400 Bad Request No request found micro_httpd when accessing router page

PROBLEM I have been having issues with my ping lately so I decided to troubleshoot what the issue could be. My ping issue would happen on and off so I did not pay much attention thinking it would go ...
2
votes
0answers
48 views

vim/neovim reverse shell vulnerability - why does this work?

Warning This question includes code from the original description of the vulnerability and proof of concept file. It will in the worst case open a reverse shell that may grant privileges to other ...
2
votes
1answer
85 views

Is it possible to map ‘Ctrl+CapsLock’ to escape key in VSCode Vim?

I’m using a CapsLock key as a Ctrl key and an Esc key using below command remapCapsLockToControl() { xmodmap -e 'keycode 66 = Control_L' xmodmap -e 'clear Lock' xmodmap -e 'add Control = ...
1
vote
1answer
21 views

Removing ANSI Color Codes from a text file in VI

Using VI/Vim how can I remove color coding? I found this: Removing ANSI Color Codes from a Stream answer from @adam-katz @olibre cat colored.logs | sed 's/\x1b\[[0-9;]*m//g' I thought I could ...
0
votes
0answers
30 views

.vimrc file works with csh, not bash

My .vimrc file installs some plug-ins and enables syntax. With csh, all of this works perfectly. But when I switch to bash, none of these options work anymore; I get errors for the plug-in manager and ...
0
votes
0answers
61 views

E481 for every line of .vimrc on remote server, same text works locally

to start, I set up my local vimrc with the following and it works without issue. 1 colorscheme default 2 syntax enable 3 set number 4 set showcmd 5 set cursorline 6 set tabstop=4 7 set ...
0
votes
1answer
24 views

How to open a file with vim without showing number and relativenumber

I have options set in ~/.vimrc that always show number and relativenumber. But sometimes I know prior to opening the file that I don't want such options, so I'm seeking a way to disable such options ...
-1
votes
1answer
21 views

In macvim, can i keep cmdheight=1, without getting a prompt before opening some files?

In vim, can i keep cmdheight=1, without getting a prompt before opening some files? My issue is that if I do ~/whatever$ vi app/controllers/application_controller.rb Then because app/controllers/...
0
votes
0answers
30 views

Vim - E490: No fold found

I'm having problems folding some lines in a LaTeX. I use the set foldmarker=/*,*/ option in my .vimrc, and is working fine in the main file, but when I change the buffer, in the other file, I can't ...
0
votes
0answers
54 views

ranger to open text files in new terminal

I've done my research on web, and have looked into questions asked such as "ranger: open with vim in new window" and "ranger what program is opening files", and many youtube videos but it is still not ...
0
votes
0answers
35 views

Vim : The “:bnext” command — Is it working properly?

According to Vim's documentation for the command :bnext (bn), if you have multiple help buffers open, you should be able to use :bn to move to the next buffer displaying help documentation. My ...
0
votes
0answers
17 views

Vi on macOS pastes single quotes as “â<9c>” and double quotes as “â<99>”

If I copy text from a book or a web page which contains quotes and then paste that text into a file opened with Vi, the single quotes come out as â<9c> and the double quotes come out as â<99&...
1
vote
1answer
29 views

VIM startup symbols in status

I am trying to move to VIM as my main text editor, already spent a lot of time setting everything and reading about VIM. Now everything is pretty much ok, except one thing that bothers me all the ...
0
votes
1answer
18 views

VS Code Vim extension

So I am trying out the Vim extension for VS Code. All works well, except if doing tab completion for open a new file. For example, say I my files in the following directory: dir1/dir2/file1.cpp In ...
2
votes
1answer
96 views

Scroll up to in Vim term

I have a terminal window in vim and need to see the output that is on a higher line than is shown. How do I "scroll" up to see that? Command that I opened my terminal with: :term bash
0
votes
0answers
43 views

default vi in zsh and bash are different

I have a root and a wheel user in CentOS 7. The default shell for root and the wheel are bash and zsh respectively. The PATH is: echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin ...
1
vote
1answer
58 views

Downgrading from Vim 8.1 to Vim 7.4 in (L)Ubuntu 14.04

I firstly installed Vim in my (L)Ubuntu 14.04 with sudo apt-get install vim After that, as required from a plugin I wanted to use, I upgraded to Vim 8.1 using the ppa:jonathonf/vim repository. Being ...
-1
votes
1answer
44 views

Yank/Paste into terminal in Vim 8.1

The terminal in vim 8.1 looks awesome. https://www.vim.org/vim-8.1-released.php I was hoping however that I'd be able to yank from another window and paste into the new vim terminal at the prompt, ...
1
vote
2answers
35 views

VIM regex pattern unable to search and replace characters that are between braces

I want to use regex to convert these: <input type="text" name="salutation" value={salutation} /> <input type="text" name="first_name" value={first_name} /> into these: <input type="...
2
votes
1answer
54 views

Vim - Move selection up/down with Ctrl+Shift+Arrow

I want to move a selection up/down with Ctrl+Shift+Arrow, similar like in other editors. What I currently have in my .vimrc is the following: " from https://superuser.com/a/825561 :behave mswin :set ...
0
votes
0answers
13 views

Does the atom editor have any 'confirm each before replace option' similar to what VIM has, instead of a mass Find All replace?

In vim you can do %s/find/replace/gc to find all in file %s/<find>/<replace>/ and replace each instance in all lines g but confirm c first. I use it all the time; is there any way to ...
2
votes
1answer
33 views

Vim in Powershell inserts unwanted UTF-8 characters when using the numpad

When running Vim from Powershell, using the number pad in insert mode is sending the following characters: 1: ÎÞ 2: Îâ 3: Îæ 4: Îê 5: Îî 6: Îò 7: Îö 8: Îú 9: Îþ 10: ÎÚ How can I allow the number pad ...
1
vote
1answer
43 views

Surround certain string with specified characters using regex-capable editor

I need to format certain string in Sphinx's documentation H2 Header. Example: v-add-user should be replaced with ********* v-add-user ********* I search for needed string in Notepad++ (regex ^(...
0
votes
0answers
305 views

Dracula theme causing italics in gVim to be cut off

For some reason, the Dracula theme is cutting off one of the characters in an italic word sometimes. I thought this was a font issue, so I switched from Fixedsys to Fira Code, but the issue still ...
1
vote
1answer
52 views

vim displays rbg codes in quickfix bar before error output

Recently I've started using :make and various other commands that make use of the quickfix bar. However the output it produces has this initial line of an escape character and rgb codes. I was able ...
0
votes
0answers
9 views

How to go to definition of python package function in vim?

I've installed ctags and indexed my python project with: cd path/to/my/python/project ctags --python-kinds=-i -R . but this index does not include an understanding of the definitions of python ...
0
votes
0answers
37 views

Unable to include plugins using vimrc . Error for each line of my vimrc

I have installed gVim and trying to have customizations, i.e, including plugins. https://raw.githubusercontent.com/kinbiko/dotfiles/master/vimrc Used multiple plugin managers, but in vain. Error ...
0
votes
1answer
56 views

Unable to install vim editor on Ubuntu 17.04 even after doing sudo apt-get update

My sources.list file is as follows : deb cdrom:[Ubuntu 17.04 _Zesty Zapus_ - Release amd64 (20170412)]/ zesty main restricted deb http://in.archive.ubuntu.com/ubuntu/ zesty universe deb-src http://...
3
votes
3answers
336 views

Alias to source .bashrc after it's been edited?

I would like to add an alias (for convenience sake) that would allow me to edit my bashrc, and if changes were made, source it, but if no changes were made, don't source (in case I changed my mind). ...
0
votes
0answers
19 views

Make pyflakes use python2.7 instead of python3 (with python-mode in vim)

I am working on a project using python2.7. However I get a lot of errors of the form model_training/run_rl_training.py|57 col 1 error| E0602 undefined name 'xrange' [pyflakes] I assume this is ...
0
votes
0answers
18 views

Can't open Vim whenever there are any .py files in the working directory

I get this error whenever I open vim The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). YCM core library compiled for P... in Python 3. Set the 'g:ycm_server_python_interpreter' ...
1
vote
1answer
28 views

How to make Vim “repeat search” direction absolute instead of relative?

I am looking for a way to make Vim always go backwards whether I press repeat last , or N and forward when using their pairs ; or n. Currently Vim is using a relative direction which depends on the ...
0
votes
1answer
212 views

Installing Vim With Python 3 Support Linux

This seems to be a relatively common problem but I've tried a variety of approaches and have not been able to compile Vim from source. I recently got an AWS EC2 Linux instance which I've been ...