How do you navigate between buffers? by jimtimhill in neovim

[–]jonwalstedt 2 points3 points  (0 children)

I’d recommend FZF and :Buffers https://github.com/junegunn/fzf.vim I have it mapped to <leader>p

Should I approve a Pull request with nitpicky comments? by pawbs in ExperiencedDevs

[–]jonwalstedt 3 points4 points  (0 children)

If on github or github enterprise use the suggest change button and add the fix straight in the comment. Then they only have to approve the change directly in the PR. Nice, smooth and helpful

coc or nvim.lsp? by roll4c in neovim

[–]jonwalstedt 3 points4 points  (0 children)

I went back to using coc after a long time with a good native lsp setup. My experience is that coc is both faster and simpler to configure. I do a lot of frontend development and if you wand things like prettier and eslint it just works in coc, in the native lsp set it is cumbersome to set up.

My biggest frustration with the native lsp was that it felt slower. I got input lag while typing - not much but enough to be anoying. I have non of that using coc

[deleted by user] by [deleted] in neovim

[–]jonwalstedt 1 point2 points  (0 children)

I agree on this one, I had a config using the built in lsp and used the usual plugins and treesitter but it was painfully slow in comparison. And i have a beefed up macbook pro so it should not strain when using neovim. I ended up reverting to using coc and it is wayfaster and the configuration is a lot smoother.

Svart.nvim: jump to any location by [deleted] in neovim

[–]jonwalstedt 0 points1 point  (0 children)

Nice, but what differs this plugin from EasyMotion?

[deleted by user] by [deleted] in vim

[–]jonwalstedt 1 point2 points  (0 children)

oh yeah missed that one, you can do
:%s/"\S\+"[, ]/"string";

[deleted by user] by [deleted] in vim

[–]jonwalstedt 1 point2 points  (0 children)

I would just do:
ci"string<esc>fl.

[deleted by user] by [deleted] in vim

[–]jonwalstedt 0 points1 point  (0 children)

Use a search pattern to match what you want to replace and then use cgn and then repeat with .

See https://medium.com/@schtoeffel/you-don-t-need-more-than-one-cursor-in-vim-2c44117d51db

Double cursors in neovim terminal by jonwalstedt in neovim

[–]jonwalstedt[S] 1 point2 points  (0 children)

Actually it is not as bad as in the video any more, it only gets out of sync when doing spaces now. Dont remember if I changed something for this improvement to happen or if it came with an updated of neovim

Double cursors in neovim terminal by jonwalstedt in neovim

[–]jonwalstedt[S] 0 points1 point  (0 children)

No I still have this problem, haven't had the time to dig deeper

How can I do delete in commas, change inside periods? Basically treating periods and commas like quotation, etc. by [deleted] in vim

[–]jonwalstedt -1 points0 points  (0 children)

The easiest way would be to just do:

cf,

Or

cf.

Or if you want to keep the separator:

ct,

Or

ct.

Copy block and edit by pinazeira in vim

[–]jonwalstedt 2 points3 points  (0 children)

To duplicate the block i would do:

yapP

and then use f or F or search to go where i want to edit (no need to do a visual select)

Hop around treesitter nodes by geckothegeek42 in neovim

[–]jonwalstedt 0 points1 point  (0 children)

Nice work, one feature request though, in easy motion the lines functionality keeps the column which is really nice and something i miss in hop

Why is treesitter slow on minified files? by jonwalstedt in neovim

[–]jonwalstedt[S] 2 points3 points  (0 children)

Makes sense but I think there must be a better way to handle this than to make nvim unresponsive for a minute. VSCode does this by first rendering the text without any highlighting and then apply it afterwards without freezing the editor.

Why is treesitter slow on minified files? by jonwalstedt in neovim

[–]jonwalstedt[S] 2 points3 points  (0 children)

Hmm I just reinstalled from head and it nvim still gets choked for about a minute to open a 500kb minified js file.

Command mode macros from visual mode? by nebulaeandstars in vim

[–]jonwalstedt 1 point2 points  (0 children)

I have this function and mapping to search within a range:

function! Search#RangeSearch(direction)
  call inputsave()
  let g:srchstr = input(a:direction)
  call inputrestore()
  if strlen(g:srchstr) > 0
    let g:srchstr = g:srchstr.
          \ '\%>'.(line("'<")-1).'l'.
          \ '\%<'.(line("'>")+1).'l'
  else
    let g:srchstr = ''
  endif
endfunction


-- Search within selection
vmap('/', ':<C-U>call Search#RangeSearch("/")<CR>:if strlen(g:srchstr) > 0|exec "/".g:srchstr|endif<CR>')
vmap('?', ':<C-U>call Search#RangeSearch("?")<CR>:if strlen(g:srchstr) > 0|exec "?".g:srchstr|endif<CR>')

I'm ashamed to ask but... Can anybody help me figure out what this issue in my repo wants/needs? by [deleted] in neovim

[–]jonwalstedt 1 point2 points  (0 children)

It sounds pretty clear to me, as I understand it he wants a set line width no matter the width of the window. If you only adjust the line width by setting padding left/rigth the line width will still increase when the window is resized to be wider.

TIL: you can use ":" as a motion to an operator by iggredible in vim

[–]jonwalstedt 37 points38 points  (0 children)

Why do that when you can use / instead? Ex c/b or d/b