19 votes
Accepted

How to format files on save using black with neovim and coc

This is a coc.nvim setup procedure that works for Neovim, which aims to: Use coc-pyright as language server. Provide static type checking from a Python virtualenv (e.g. I have created a venv called ...
Gordon Bai's user avatar
12 votes
Accepted

Python debugging

For me vimspector looks amazing, and has out-of-the-box Python support.
Shay Palachy Affek's user avatar
10 votes

Python debugging

There are alternatives. Plain ol' pdb can be integrated into vim with vimpdb vebugger, etc (My own favourite) pudb can be integrated with pudb.vim vim-pudb And the popular ipdb can be integrated ...
jalanb's user avatar
  • 684
6 votes

How can I watch variables when debugging Vimscript?

Vim :debug sessions are modal. When started we are prisoner of this non ergonomic mode. We could try to send anything we want to a buffer or a window, that window will never get refreshed and properly ...
Luc Hermitte's user avatar
  • 17.4k
6 votes
Accepted

Any recommended ways to debug vimscript?

In an extremely related Q/A, I've listed all the tools I provide and use to help tracking errors in vim scripts: https://vi.stackexchange.com/a/25863/626 They complement :debug.
Luc Hermitte's user avatar
  • 17.4k
5 votes

Sometimes gvim doesn't show character typed immediately

It seems that vim is waiting for another key to be pressed to continue. You can search for a mapping that use a<some_other_key> using the comand :map a and :imap = for the equal sign.
Macunaíma's user avatar
3 votes

How to format files on save using black with neovim and coc

I had the exact same issue. I solved it as below: Don't use black and isort from inside coc. Coc timeout issue mentioned by @Gorden Bai seems unresolved. My coc-settings.json: { "python....
Ashwin Mahantha's user avatar
3 votes
Accepted

How to debug 100% cpu - python subprocess

You could use that vimspector you have installed (in another instance of vim) to attach to the python process and get a stack trace. Debugpy supports attach-by-PID so you do something like this: ...
puremourning's user avatar
3 votes
Accepted

How can I pass extra arguments to gdb with Termdebug?

gdb argument support is added at patch 8.0.1713: Termdebug [gdb-args] command command argument support is added at patch 8.0.1725: TermdebugCommand command [command-args] Additionally, once ...
dedowsdi's user avatar
  • 6,258
3 votes
Accepted

Vim hex editor with xxd not working as intended

This will happen if you start editing the xxd-dumped version of the binary file, in which case Vim will assume a UTF-8 encoding (which you can confirm with :set fenc? returning fileencoding=utf-8). ...
filbranden's user avatar
  • 28.8k
3 votes

How can I watch variables when debugging Vimscript?

Even in v8.1, the short answer is no; you cannot positional-statically display the content of a variable without a plugin ... OR additional vim scripting. Alternatively However, Decho plugin does ...
John Greene's user avatar
3 votes

Specify GDB version for Termdebug

As pointed out by Christian (all credits to him) in this comment, setting g:termdebugger does the trick. Put this into your .vimrc: let g:termdebugger='/path/to/your/gdb' Single quotes are needed.
Paulo's user avatar
  • 31
2 votes

Python debugging

You could simply make shortcuts on python files that imports pdb and add a pdb.set_trace() etc. But I use PUDB (that is the same, but with syntax highlight and all good graphical stuff) with the ...
Oskar 79 115 99 97 114 80 108 's user avatar
2 votes

Debugging foldexpr function

Sorry I don't have a clear answer to your problem, but a few tricks that you could use instead. Typically, you could add the messages into a |List| and display them (the list) on demand. In my (...
Luc Hermitte's user avatar
  • 17.4k
2 votes

customising Termdebug commands

It's documented at :h termdebug_shortcuts nnoremap ,u :call TermDebugSendCommand( printf( 'until %d', line('.') ) )<cr> update It's add at patch 8.1.0071 . Tons of bugs have been fixed since ...
dedowsdi's user avatar
  • 6,258
2 votes
Accepted

How to test whether the cursor is at the end of a line in a mapping?

Try this instead: col('.') >= col('$') - 1 col('$') returns the number of the bytes in the cursor line plus one. Unless you have 'virtualedit' set, the cursor will never be in that position. (I'm ...
Rich's user avatar
  • 31.9k
2 votes

Highlight the full text searched on vi editor?

Quite frankly, you should consider using less(1) and grep(1) to view the log files on your servers. See, a text editor is used primarily to edit text, while other utilities are used primarily to view ...
dsimic's user avatar
  • 217
1 vote

Highlight the full text searched on vi editor?

As answered by dsimic (I don't have enough points to just comment on theirs), vi is best at editing text, while other linux tools are designed for viewing/filtering. less is great for those familiar ...
Polo's user avatar
  • 41
1 vote

How can I investigate the execution of Vim?

For running and debugging vim, see :help terminal-debug. More likely, though, screen is eating the first escape for some reason, so vim never sees it (or, screen is holding the escape, waiting to ...
D. Ben Knoble's user avatar
  • 26.2k
1 vote

NeoVim Save BreakPoints to Session

This and more (saving of watch window variables) should now be possible with a recent commit on github. Essentially, prior to exit, you can have something so: nnoremap <leader>d1 :call ...
Tryer's user avatar
  • 247
1 vote

VIM + VDebug in WSL2 while having WAMP and XDebug on Windows

The solution was path_maps option in vdebug plugin: let g:vdebug_options = { 'path_maps': { 'D:\Dropbox': '/mnt/d/Dropbox' } } The code of how path_maps are parsed is located in util.py file of the ...
OGCJN's user avatar
  • 141
1 vote

Debugging python2 under windows

If using vimspector, you can set the python launch argument to point to the python interpreter that debugpy uses to debug your application. It's even in the example https://github.com/puremourning/...
puremourning's user avatar
1 vote

Vim hex editor with xxd not working as intended

Here's what I have in my ~/.vimrc to allow quite comfortable and issue-free editing of binary files, which are narrowed down to *.bin and *.hex files in the vimcode below, but that can be adjusted as ...
dsimic's user avatar
  • 217
1 vote

Can you recognise this debugging system? How can I switch it off?

As Christian Brabandt replied: :set signcolumn=no seems to solve the issue. Thanks!
idankor's user avatar
  • 145
1 vote

How can I log debug messages without blocking?

I'm sure there are at least a few third party alternatives for this. One I'm familiar with is Decho which is used by netrw. You can enable/disable logging, indicate function enter/leave and depth and ...
B Layer's user avatar
  • 19.8k
1 vote

How can I log debug messages without blocking?

As @dedowsdi said in a comment: Log into a list. The following is derived from stuff I have in one of my plugins: function! DebugMsg(msg) abort if !exists("g:DebugMessages") let g:...
Ralf's user avatar
  • 9,197
1 vote

How to find all scripts which modified a certain vim setting?

Put vimgrep matches in files from :scriptnames into the quickfix list Using :scriptnames allows to consider only files which have actually been sourced and then you can grep for the full and ...
Hotschke's user avatar
  • 4,750
1 vote

Vim slow to open buffers, but not specifically in any sourcing plugin step

Okay, so the startup log wasn't actually very helpful here. There wasn't really any indication in the log that this was the culprit, but it turns out it was vim-bundler. I actually didn't even paste ...
ttrmw's user avatar
  • 21

Only top scored, non community-wiki answers of a minimum length are eligible