All Questions

Filter by
Sorted by
Tagged with
3
votes
1answer
142 views

neovim-qt : Is it possible open files in the existing window?

When I open a file (either from dolphin or terminal) a window of nvim-qt is created. Is there a way to open the file in the existing nvim-qt window and raise/focus to the window? Note: I know there ...
0
votes
1answer
98 views

Is it possible to type “return + shift” to insert a new line in deoplete?

Here is a situation. I use deoplete but since the pop-up menu when I type in something already puts the cursor at the first item on the list, when I type in return, it inserts a new line. So I want ...
0
votes
1answer
125 views

Is it possible to use normal mode type editing in denite?

denite seems to use the cmdline like ctrlp instead of a buffer like Unite. Is there a way to edit your query with normal mode commands?
1
vote
2answers
672 views

Python support using pyenv

I am at the end of hour-long research on why I cannot install vim with proper python support. Problems already recognized: Impossible to install python 2 and 3 support together on ubuntu 16.04; oh ...
0
votes
1answer
39 views

Can I use feedkeys() inside of a keyloop implemented by getchar()

I implemented a fuzzy filter, which accept a list argument, open a window with a scratch buffer whose content set to the list, then waiting for use input and do filtering. Here is why I ask this ...
1
vote
0answers
15 views

How to convert register contents to something readable similar to :register command?

Let's assume there is a macro stored in register 'r' I can obtain the contents of this register by executing getreg('r'), but if I print this then it can often be unreadable. I noticed though that ...
1
vote
1answer
13 views

Deleting folds over a range

Working in an index with mucked up manual folds. Would like to delete folds from current line to end of file. Have tried: :.,$zd and :.,$df So far I've just done a visual selection from current ...
2
votes
2answers
21 views

mutually exclusive Autocommands for similar file extensions

I have a couple of autocmds in my vim config along the lines of this (the actual commands are quite long): au BufWritePost *.latex.md silent! ... au BufWritePost *.md silent! ... where ...
2
votes
2answers
3k views

What does :%! mean? [duplicate]

I saw an editor command which started like this: :%! sort What does that mean? Specifically, the :%!.
3
votes
2answers
263 views

How does double star work in vim?

When I run shopt -s globstar; ls -1 tests/**/Helpers/**/*.php in bash I get: tests/Helpers/Layout.php tests/Helpers/Link.php tests/Helpers/LinksPage.php tests/Helpers/LiqpayRedirect.php tests/Helpers/...
2
votes
1answer
51 views

Format / Indent c++ as you type inside expressions

In visual studio, that code : for(int x=0;x<10;x++) {} becomes that code : for (int x = 0; x < 10; x++) { } as soon as you hit enter. I was wondering, is it possible, and if so, how can I ...
2
votes
1answer
25 views

Syntax highlighting for objdump output

Currently I am working a lot with objdump output (arm / thumb instructions): The command (arm-none-eabi-objdump -h -S main.elf > main.lst) creates a mixture of assembly (with addresses and hex ...
1
vote
1answer
30 views

Change definition of “under the cursor” for ctags with C++ qualifiers

When jumping to a tag it seems that ":" are ignored for the purpose of "under the cursor" (I'm assuming it's "word" "under the cursor"). For example if I want to jump to myTree::Node something I ...
1
vote
1answer
48 views

Vim-Surround but not shift+S in visual mode

How do I disable vim-surround in visual (selection) mode? IE. If I hit shift+S I want to replace all the lines I have currently selected ( the normal vim functionality )
2
votes
1answer
455 views

Use the PYLS python LSP with ALE on Neovim

I installed NeoVim and dense-analysis/ale plugin with vim-plug. All of those seems to be installed, as the commands starting with :ALE autocomplete in NeoVim. Then I tried to install PYLS via ...
2
votes
0answers
46 views

MacOS Terminal CPU spike after exiting Vim

I'm using Vim 8.1 from homebrew on MacOs 10.14.6. Whenever I exit vim back to the terminal, the first keypress in the terminal afterward results in a beachball and CPU spike to 100%, with terminal ...
0
votes
2answers
332 views

Font on Mac Catalina

I just now upgraded to Catalina on Mac (10.15) and immediately ran into an odd font behavior: when I open a file with MacVim (8.1.1722 (157)), the letters with tails (g, y, p...) have their tails cut ...
0
votes
1answer
36 views

change fold sign character

I know per my question remove trailing dashes in foldtext that I can remove the trailing dashes from collapsed fold lines. When a fold is 'open', the sign column has pipe characters '|'. I looked at ...
1
vote
2answers
55 views

Change Neovim cursor in insert mode under st (simple terminal) and tmux

My Neovim cursor normally switches to a pipe symbol (|) when I'm in st, but it doesn't when tmux is open in st. Is there something special to do? Version: Neovim: v0.5.0-dev Tmux: 2.9a My ...
1
vote
1answer
43 views

How to fold nested “if then else end if” statements

I try to write a vim syntax file for folding if-else statements with the syntax: if <condition> then <block to fold> [else <block to fold>] end if Current approach syn region Then ...
3
votes
1answer
19 views

Insert mode mapping to leave insert mode then invoke a plugin function

In Insert mode, I want a mapping which will return to Normal mode, then call a plugin function. I've tried this: inoremap <a-1> <ESC><Plug>AirlineSelectTab1 It exits Insert mode, ...
1
vote
1answer
81 views

Is it possible to have vim run a command every time save `:w` is invoked?

I am editting typescript now, and I'd like to be able to have it so, whenever :w is invoked, the shell runs tsc compiling my new save. This beats having to !tsc every time. Does something like this ...
0
votes
0answers
19 views

Run a process whenever I save any of the open buffers [duplicate]

would it be possible to run an arbitrary command in a terminal (like node tests.js or cucumber -p @wip) whenever any of the open buffers in vim are saved? I guess I'm thinking of a save hook or ...
2
votes
3answers
44 views

Why is my locale replaced when I run an external command?

Why is my locale setting replaced when I run an external command with :!cmd ? And which configurations should I check to find the cause of this problem? I've checked configs for my shell (zsh): ....
8
votes
2answers
504 views

How to Insert a console.log for word under cursor in new line

Use case: In a JS file, I have an expression like: if (someVar === 'someValue') { statements; } and, for debugging purposes, I sometimes want to include a console.log in the line above: ...
1
vote
1answer
442 views

Use flake8 for Cython with w0rp/ale

I'm using flake8 to check my code with ale plugin. I found a way to make it work with Python 3, but it seems it does not recognize Cython file (.pyx) even if we set as follows. let g:ale_linters = { \...
1
vote
1answer
63 views

Highlighting arbitrary text

When I'm writing, I often have 2-3 buffers open. My main body of text in the middle, and then supporting materials on the left and right. I often read a paragraph from one of the supporting buffers ...
1
vote
1answer
41 views

Why does my line indent?

Please see line 20 and 21: My question is about how vim decides to auto-indent line 21, and how to adjust that behaviour. When I took this screenshot I had formatoptions=qrn1a set, however I believe ...
11
votes
2answers
785 views

Neomake hanging when using eslint

I have been following the following two tutorials to try and set up eslint and Neomake: Linting code with Neomake and Neovim Linting code with Neovim and Neomake - ESLint edition So I have the ...
1
vote
2answers
193 views

Cannot set (let) mapleader and use <leader> in global vimrc

I'm using basic version vimrc from https://github.com/amix/vimrc. No problem if I put my vimrc at /home/{user}/.vimrc, but if I put it in /etc/vimrc (arch) or /etc/vim/vimrc (debian), it becomes a ...
1
vote
1answer
45 views

Yank then Paste without moving cursor

I want to be able to: :42y then something like: :13p having it to paste the yanked line in a new line after 13, without taking my cursor away. So far, all solutions I have found involves going to ...
2
votes
0answers
26 views

How to profile save time

Sometimes it takes a really long time to save a file out. Saving the same file after various changes takes various amounts of time. It does not seem to be related to file size. I've disabled any ...
1
vote
0answers
19 views

How to correctly add syntax highlighting to all c typedef

I saw that it's possible to manually add types to highlight, according to this post: https://stackoverflow.com/questions/20149478/how-can-i-teach-vim-about-additional-c-language-types-for-syntax-...
3
votes
2answers
95 views

Is there a way to paste at multiple locations/lines in vim?

I use :copy a fair bit. So like range :12,15 copy 20 will paste a block of text from 12 to 15 lines at 20th line. But when I want to paste a line at multiple places it doesn't work. For example :24 ...
3
votes
1answer
694 views

No Solarized Light in GVim (GTK3)

I manually installed the Solarized colour scheme from the Vim-only repository and adjusted my ~/.vimrc as indicated in the documentation, including using set background=dark. GVim 7.4 (GTK3) under ...
1
vote
1answer
42 views

Why can't I remap q [closed]

I have many key mappings in my vimrc but for some reason no matter what I do q remains mapped to recording macros. I will post my full vimrc below, but the relevant part is that even if the last line ...
3
votes
1answer
33 views

Archive files opened with Vim are unreadable, even with zip plugins installed

I am trying to open archive files in Vim (zip files, jar files), but they are unreadable when opened. For example, I created a zip file with one file in it: $ touch testfile.txt $ zip test.zip ...
0
votes
1answer
105 views

Shortcuts for math and quotes with vim-latex & insert space after fullstop

I have recently managed to install and configure vim-latex and started using it. I used to use TexStudio for writing my file and in it I used to have several setting that were tailored for my workflow:...
2
votes
1answer
51 views

vim-plug: install plugins on startup not working properly on Ubuntu

per the recommendation in the vim-plug wiki: https://github.com/junegunn/vim-plug/wiki/extra, I've added the following snippet to my vimrc: " Install missing plugins on Vim startup autocmd VimEnter * ...
2
votes
1answer
27 views

How to make spell check work for text inside a XML file?

Editing a Qt localization file, which actually is a XML. I'd like to check spelling for a text inside tags, so executed a command setlocal spell spelllang=fr After that only attribute value become ...
76
votes
6answers
11k views

How do I jump to the location of my last edit?

I often make changes to the middle of a big file, use gg to jump to the top to check something, and then realize I forgot to set a mark where I was editing. Is there a built-in way to jump to the ...
2
votes
1answer
306 views

ruby syntax highlighting lost on long files

With a "long" ruby file (896 lines in my case) the ruby syntax highlighting is lost when I G to the bottom of the file. Once that happens and I go back to the top with gg, the syntax highlighting ...
10
votes
3answers
740 views

Is there a plugin to preview the line where the corresponding open bracket is for a close bracket?

If I am using IntelliJ and I hover over a close bracket for a scope that starts somewhere that is not currently visible, it shows a popup at the top of the window previewing the line where with the ...
3
votes
2answers
154 views

Get file name and directory in .vimrc file

I have mapped my F5 key in vimrc file to run the code using the following command: map <F5> :!sh -xc 'cd "/home/hashir/vscode/" && g++ test.cpp && ./a.out It is working well. ...
4
votes
3answers
265 views

How to decrease markdown header level in visual mode without a plugin?

I have a file like this: # Heading A ### Heading B1 lorem ipsum ### Heading B2 lorem ipsum and I want to reduce the header levels of B1 and B2 to look like this: # Heading A ## Heading B1 ...
0
votes
1answer
31 views

Can't set neovim colors to follow terminal colors in st terminal

I can't set neovim colors to follow terminal colors in st terminal. Here is screen from the terminal: I have tried different configurations of set t_Co=256 and set termguicolors but all of them give ...
1
vote
2answers
45 views

Move cursor and screen together

I am implementing a smooth scrolling function for <C-u> and <C-d>, which just sleeps for a few milliseconds and then moves the screen up (<C-y>) or down (<C-e>) one line: ...
7
votes
2answers
453 views

Difference between “* and ”+ registers in +clipboard VIM?

"*p and "+p seem to behave the same. I tried :help "*, but it's talking about mouse selection, and :help "+ tells me There are three documented X selections: PRIMARY (which is expected to ...
2
votes
2answers
86 views

map <leader>b<number> :b<number><cr>

I am using a convenient macro to list my buffers: map <leader>bb :buffers<cr> I am trying to come up with a way to then switch to the buffer of interest with <leader>b<number> ...
2
votes
1answer
56 views

Get neomake to recognize python and gcc location

I installed the latest versions of Python and GCC/G++ in alternative locations. I am using SpaceVim. I think SpaceVim is using neomake as the default. I want to know how you can configure neomake to ...

15 30 50 per page