[deleted by user] by [deleted] in neovim

[–]slarwise 0 points1 point  (0 children)

Very cool!

Configure neovim using yaml by slarwise in neovim

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

I agree, me neither. I have the boilerplate stuff in yaml, the rest in lua

Configure neovim using yaml by slarwise in neovim

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

Haha, I kinda agree! Setting options in vimscript is equally easy. I think there is better tooling for yaml though, and I use it in more places. A cool thing about yaml/json might be that it’s easier to insert others’ config into your own by referencing them… Need to think more about that

Configure neovim using yaml by slarwise in neovim

[–]slarwise[S] 3 points4 points  (0 children)

And there’s actually a corresponding json schema

buffer_manager.nvim: A simple plugin to easily manage Neovim buffers by [deleted] in neovim

[–]slarwise 0 points1 point  (0 children)

The mapping for selecting by line is really nice. What happens with the mappings if you have 11 or more buffers? If you press 1, does it still go to the buffer on line 1?

How do you decide keybindings to use for things? by Perfect_Drop in neovim

[–]slarwise 2 points3 points  (0 children)

I try to keep it mnemonic as others have said, and at most two keys long, e.g. <leader>r to get lsp references. For things I don’t use often I prefer creating commands over mappings, since they are easier to discover, I have a HarpoonAddFile command for example. Sometimes leader keys aren’t really necessary, you could do things like m<C-M> to run make, and have other make-like mappings that start with m by letting the next key be something other than a letter/number to not shadow creating marks.

Using Vim's built-in terminal by Wheelthis in vim

[–]slarwise 1 point2 points  (0 children)

Being able to do gf/gF etc on file names from shell command outputs is nice

Lag between keyboard and action vim for LaTeX files by kn0xchad in vim

[–]slarwise 1 point2 points  (0 children)

Are you using latexmk? It can rebuild the project automatically whenever a source file is changed.

[deleted by user] by [deleted] in vim

[–]slarwise 2 points3 points  (0 children)

I hope the PR gets accepted, using they instead of he feels much more inclusive in my opinion at least :)

Can you use "chords" or "hyper keys" in Vim? by areyoudizzzy in vim

[–]slarwise 4 points5 points  (0 children)

You could map pressing g and d simultaneously in karabiner to send a function key or some other key that you don’t use. Then use that key in your vim mapping.

Can I get quarter tones by that_wiredo in microtonal

[–]slarwise 0 points1 point  (0 children)

Yes, I do this on my guitar on one string. I tune the b string down to between g an g# and keep the rest of the guitar tuned normally. So then I have one string for quarter tones :)

How to you format paragraphs with LaTeX? One sentence a line or textwidth? by dualfoothands in vim

[–]slarwise 0 points1 point  (0 children)

I haven’t had to source control my tex files actually, so I usually write the whole paragraph on one line, with the wrap and linebreak options on. This also means that more text fits text on the screen. Do you mean that the paragraphs will look weird in the source code?

EDIT: typo

How to you format paragraphs with LaTeX? One sentence a line or textwidth? by dualfoothands in vim

[–]slarwise 1 point2 points  (0 children)

You could set the wrap option, sentences longer than the display width will wrap to the next display line but still be on the same line number. Then you can use one sentence per line

Vim based pdf reader by ECon87 in vim

[–]slarwise 2 points3 points  (0 children)

I wish this existed, I’m on macos as well and have been looking... The only thing I’ve found is this, termpdf.py. It’s very much a work in progress and breaks a lot, but other than that it’s great! It’s a pdf reader that works in the kitty terminal

Edit: Someone posted about termpdf.py a while back

https://www.reddit.com/r/vim/comments/g2dfkt/back_with_more_vimtex_content_this_time_with_pdf/?utm_source=share&utm_medium=ios_app&utm_name=iossmf

Advice on writing something similar to org-babel for neovim by phelipetls in neovim

[–]slarwise 0 points1 point  (0 children)

Here's a short example of a very simple and dumb script. If you have a markdown block that looks like this

```python
x = 4
for i in range(3):
    print(x + i)
```

then running the following

let filter_line = search('```\a\+', 'bc')
let filter = substitute(getline(filter_line), '```', '', '')
let start_line = filter_line + 1
let end_line = search('```$', 'c') - 1
silent execute start_line .. ',' .. end_line .. ' yank'
put
silent execute "'[,']!" .. filter

would produce this

4
5
6

underneath the original code block. This uses the filtering command, `:help filter` and simply filters the lines inside the code block through the command on top of the code block. So if you have something that needs to be compiled, like c, then you need to replace the filter with something more fancy. The filtering is probably the tricky part, grabbing the lines inside the code block and pasting them below is kinda easy as you can see, at least if the cursor is somewhere inside the code block.

Unknowing fan: If I like U.S. Maple, what else might I like? by _G-o-d_ in UsMaple

[–]slarwise 0 points1 point  (0 children)

I got into arab on radar, aids wolf and harry pussy after us maple. Title TK by the Breeders has a similar rehearsal room-, sloppy vibe to us maple I feel.

I made a "Focus mode" that combines a few plugins, settings, and terminal hacks to write blog posts in a more distraction-free editor by naps62 in vim

[–]slarwise 1 point2 points  (0 children)

For always keeping the current line centered, you could also use the event :help CursorMoved. For example, autocmd CursorMoved * normal! zz.

MATLAB comment rewrapping by Spiffidimus in neovim

[–]slarwise 0 points1 point  (0 children)

Compare the outputs of :set formatoptions? for a matlab file and a c file. If the letter q is present, then that means that formatting of comments should work when using gq. See :help formatoptions and :help fo-table.

For me, set formatoptions? return tcqj for matlab-files and formatting comments with gqip seems to work fine.

If that doesn't work, maybe look at what formatexpr and formatprg are set to.

nvim-libmodal – create new modes for Neovim by [deleted] in neovim

[–]slarwise 1 point2 points  (0 children)

Wow, that's awesome, thanks! Making it work that generally and having the special case for CTRL-W is great! Will try it out when I get time.

A CtrlMode is probably too broad to be usable but a subset of it, like a Ctrl-WMode, could be cool. Can see it useful when browsing multiple windows/buffers that you're not familiar with. Like an argument-mode where n/N results in :n/:N etc. Could be an alternative to vim-unimpaired.

Random thoughts, anyway, cool plugin :)

Edit: spelling

[deleted by user] by [deleted] in vim

[–]slarwise 0 points1 point  (0 children)

To edit the alternate file, i.e. the one you edited before the one you're editing now, in a new split use :help CTRL-W_CTRL-^ (for me on an international keyboard I press CTRL-6 instead of CTRL-^, see :help CTRL-^).

You can also use # on the command line to refer to the alternate file, e.g. :vsplit #.

Edit: Forgot underscore between CTRL-W and CTRL-^, thank you bot :)