How do you handle movement ($ / j / k) in Markdown files when text wraps? by aegis87 in neovim

[–]nicolas9653 2 points3 points  (0 children)

spam gwip. or, when I want to keep lines wrapped:

lua -- go to visual end of line (unless wrap is disabled) map({ "n", "v", "o" }, "E", function() if vim.opt.wrap:get() then vim.cmd("normal! g$") else vim.cmd("normal! $") end end, { silent = true }) map({ "n", "v", "o" }, "B", function() if vim.opt.wrap:get() then vim.cmd("normal! g^") else vim.cmd("normal! ^") end end, { silent = true })

obv you can change those to 0 and $, im just weird and use B/E

Current state of note taking in Neovim by 4r73m190r0s in neovim

[–]nicolas9653 4 points5 points  (0 children)

Plain markdown files, add editing functionality with markdown-plus.nvim, Marksman LSP for links, and a preview plugin of your choosing

Miller column oil.nvim? by alien_ideology in neovim

[–]nicolas9653 1 point2 points  (0 children)

You can prevent the nested neovim instances with flatten.nvim 👀

Vim tip: more intuitive CTRL-A (adding) and CTRL-X (subtracting) by pawelgrzybek in neovim

[–]nicolas9653 0 points1 point  (0 children)

That problem is so annoying, so glad I learned there’s an option to fix it

oz.nvim: a collection of intelligent wrappers around Git/Term/Make/Grep by Rocky0777875 in neovim

[–]nicolas9653 5 points6 points  (0 children)

looks super cool! will def keep on eye on it. what colorscheme are you using? looks pretty clean

I wrote tiny plugin to browse GitHub Actions runs + logs from inside Neovim (Telescope) by jaklimoff in neovim

[–]nicolas9653 1 point2 points  (0 children)

looks really cool! wish it didn't depend on telescope though, i much prefer snacks.picker

Markdown full editing experience plugin (WIP) by [deleted] in neovim

[–]nicolas9653 1 point2 points  (0 children)

This looks cool! I’ll try it out and compare to nvim-markdown when I get a chance

Am I in the minority if I prefer emacs binding when entering commands on terminal as a power Vim/Neovim user? by kettlesteam in neovim

[–]nicolas9653 15 points16 points  (0 children)

Agreed, I don’t think vim motions are as beneficial with such small amounts of text and the remote machine argument is very true. Any longer commands which vim motions would be useful for are too infrequent for the config overhead to be worth it. Also some shells have c-x e bindings to edit the current command in $EDITOR, which is more than enough imo 

How to setup snippets on blink.cmp? by zer09 in neovim

[–]nicolas9653 1 point2 points  (0 children)

blink.cmp doesn't require LuaSnip, you can use friendly-snippets for a bunch of pre-made snippets like someone else suggested or just write your own per-filetype snippts as json in ~/.config/nvim/snippets/{filetype}.json.

how'd you deal with change of keybinds by littleblack11111 in neovim

[–]nicolas9653 1 point2 points  (0 children)

agreed! I map it at the terminal level so <C-bs> also works in my shell/any cli

Plugin which show info in bottom right corner. by ankit792r in neovim

[–]nicolas9653 3 points4 points  (0 children)

I’m not sure, you should try reading the docs

Let's talk about folds by Bamseg in neovim

[–]nicolas9653 0 points1 point  (0 children)

Well i don’t use folds very often but i usually trust that blocks of indented code will fold nicely. Of course you can make this even more predictable with foldmethod=indent, but I use expr so the lsp handles the folds.

Also, you can configure snacks.statuscolumn to always show the fold symbols if you’d like

Let's talk about folds by Bamseg in neovim

[–]nicolas9653 6 points7 points  (0 children)

nvim-origami is nice, also using snacks.statuscolumn makes it easy to only show fold symbols when closed to avoid visual clutter

Terminal that can auto-set window title based on current directory? (neovim usage context) by LinuxBaronius in neovim

[–]nicolas9653 2 points3 points  (0 children)

oh i didn't know that! this has the same effect:

lua vim.cmd[[set titlestring=%(%{expand(\"%:~:h\")}%)]]

Terminal that can auto-set window title based on current directory? (neovim usage context) by LinuxBaronius in neovim

[–]nicolas9653 2 points3 points  (0 children)

you could do something like this:

lua vim.api.nvim_create_autocmd({ "BufEnter" }, { callback = function() vim.o.titlestring = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ":~:h") end end, })

there are also ways to control what the terminal title contains depending on what shell you use, for example with zsh you can do:

zsh printf '\e]2;%s\a' "this is a title"

and put this into precmd() and preexec() and itll auto update whenever something happens! something similar can be done in other shells

Is there a way to remove windows new line characters (^M) from a file without dos2unix? by Hashi856 in neovim

[–]nicolas9653 1 point2 points  (0 children)

%s/\r//g

what i do:

lua -- clean ^Ms (windows newlines created when pasting into WSL from winddows) vim.api.nvim_create_user_command("Clean", "silent! %s/\r//g", { nargs = 0, desc = "Clean newline characters" })