Okay, I'm finally giving #Neovim a try; I've been using #Vim for months now and hadn't even tried Neovim, so now I'm doing it.
And to be sure I give it a fair try…
~] vim
The program 'vim' is not in your PATH. It is provided by several packages.
You can make it available in an ephemeral shell by typing one of the following:
nix-shell -p vim
nix-shell -p vimHugeX
nix-shell -p vimPlugins.vim-elixir
nix-shell -p vimPlugins.vimacs
I've finished redoing my config in lua. I like it!
@benjaminhollon nvim
Or do what I do and set up an alias for vi and vim.
@RL_Dane
Well, I remember you were having issues with the clipboard a while back; in nvim it seems to just work (for me, at least). That's been a draw for me. No fiddling with :set paste or needing a plugin for system clipboard on wayland.
Using lua for config also feels much more right than vimscript, somehow. A fully programmatic and standard solution for config is nice.
Other than that… I'll let you know. I'm still discovering things myself. ;)
@RL_Dane
I'm also enjoying the plugin ecosystem so far. lualine is better than airline, though I admit I never took the trouble to do any configuration of airline.
@RL_Dane
Heh, fair enough. I don't tend to pay much attention to the statusline, but it's handy sometimes. The main thing I would use in airline would be the live wordcount in Markdown files; I need to get that set up with lualine.
I do set up a basic statusline, but now that you mention it, the word count might be worth the (really just proverbial at this point) bloat. ;)
@RL_Dane
As for "bloat"; in benchmarks lualine took neovim's startup time from 17.2ms to 24.8ms, a 44% increase, so you might be right that it's causing significant performance detriments. ;)
Lol.
"Sir the extra line of C code to handle the edge case only increased the startup time from 1ms to 2ms."
"A ONE HUNDRED PERCENT INCREASE!?! THAT IS UNACCEPTABLE!!! REFACTOR!!!!"
@RL_Dane
Airline takes it to 79.9ms. ;)
Vanilla vim takes longer to start up than that, from what I've read.
@RL_Dane
This isn't necessarily nvim specific, but with nvim I've taken the time to modularize my config, since I decided to redo it in lua anyway.
~/.config/nvim] tree
.
├── init.lua
├── lua
│ ├── options.lua
│ ├── plugins.lua
│ └── remap.lua
└── plugin
└── packer_compiled.lua
2 directories, 5 files
Speaking of config, having it under $XDG_CONFIG_HOME/nvim rather than in my home dir is *so nice*. XD
@RL_Dane
The built-in terminal is *so much better*. It has its own normal mode, insert mode, etc., which means I was able to run that command (tree) in it, go to normal mode, yank the text, then paste it into my draft of that toot.
@RL_Dane
I'm realizing now, the better built-in terminal is gonna come in super handy when writing for tty1.
I have yet to really use that, except for :! and !!
@RL_Dane
Yeah, in vim it's not too useful. It's just a terminal, and since I'm on a tiling wm I might as well just hit $mod+return and get a new window. But with the vi modes to back me up… I could see myself using this fairly often. I'll probably set up
vim.keymap.set('n', '<C-t>', '<C-w>v<C-w>l:term')
or something of the sort.
How does the vi modes in the terminal work? Is it any different than just set -o vi in bash?
@RL_Dane
Yeah, pretty different. The normal mode just treats the whole thing like a text file; you can move around and do anything (except edits, of course; mostly, you move around, select, and yank stuff). Once you hit a key, you go into insert mode and now it's a normal terminal. To exit back to normal mode, you have to do C-\ C-n
@benjaminhollon @RL_Dane In vim's terminal you go <c-w>N to get into normal mode
@trevdev @RL_Dane
Oh, fascinating! I didn't realize that!
Still, there are a couple other minor details about nvims that are a bit easier; for example, you can actually exit it by closing the pane. If you try that in vim you get an error; the terminal session itself has to send the exit signal or whatever.
@benjaminhollon @RL_Dane If I mean to kill the terminal I just smash that <ctrl-d>
@benjaminhollon @RL_Dane That's the one
That's terrifyingly Emacs-like.
@RL_Dane @benjaminhollon That's chump change compared to Emacs
That I have not ^__^
Maybe there needs to be a vim-wordle*.
*I actually don't like the name wordle, because it's supplanting/overloading the prior usage, which was a type of word-cloud generator.
Yeah, but still weird from a vi perspective. No worries, I don't use 99% of vim's features. I'm just here for multiple layers of undo, spelling check, syntax highlighting, and Markdown formatting, for the most part ;)
@RL_Dane @benjaminhollon I get you. My markdown set up is
Any special tricks? I'm just using the built-in markdown syntax highlighting.
@RL_Dane @benjaminhollon I'm using polyglot with g:polyglot_disabled = ['markdown']. I want that for code highlighting.
Then, mkdx to enrich Markdown syntax, features and bindings: https://github.com/SidOfc/mkdx
And lastly wiki.vim to elevate my organization:
https://github.com/lervag/wiki.vim
I set wiki.vim to "markdown mode" in my rc, and wrote a parser for YAML tags as that is how I like 'em:
https://github.com/trev-dev/vim/blob/main/plugins.vim#L152
@RL_Dane @benjaminhollon ... and lastly, I made an after/ftplugin to make sure that I get the final say on some specific settings
https://github.com/trev-dev/vim/blob/main/after/ftplugin/markdown.vim
That's terrifying, lol
VI inside Emacs? No worries, here's Emacs "inside" nvim!
You mean VIper mode? Isn't that what it's called in Emacs?
@benjaminhollon @RL_Dane viper doesn't try to re-bind the whole editor or replicate a bunch of vim plugins, but it is hjkl
@benjaminhollon @RL_Dane Honestly if they can get `emacs -nw` and actually use the terminal bindings without hurling their laptop color me impressed
@RL_Dane @benjaminhollon When escape might be needed for something else I'm not sure what else I'd use
@RL_Dane
"Updoot"? XD
A #reddit term. "Updoot" is basically baby-talk for "Upvote."
I might try #NeoVim on #FreeBSD, then, because vim's clipboard is acting weird there.
Oh, that's where I ended up on my X200t. I tried #NetBSD for a little while, and while I liked it (it reminded me a bit of #OpenBSD for obvious historical reasons), I had too many problems with it on my hardware, and the lack of FDE (and the fiddliness of the workaround) was a bummer. Still, definitely an OS to try again, mad props to the devs.
...
...
But yeah, FreeBSD is nice. I barely notice it's not Linux, TBH, except that it is more unixy, whatever that *actually* means.
But man, it's fast. I didn't realize how badly OpenBSD was slowing my system down. Not to be critical, I know they think that mitigating every possible thing is super important, and I'm not going to argue that, but it made my Core 2 Duo unusable as a desktop.
FreeBSD reminded me just how capable that 13-year-old machine still is.
@RL_Dane
Heh, "more unixy" sounds kinda fun. :)
I remember you were deliberating over moving between BSDs, I hadn't realized you did it. Glad it's working well for you.
Thanks man, I'm glad I did, and I'm glad I tried all the major ones so far (I have yet to try Dragonfly, though).
I was going to go with GhostBSD, because it's a no-brainer desktop OS, but their installer doesn't have FDE yet, which is important to me.
I'm really glad I stuck with it and got #XOrg working on #FreeBSD. It took literally two minutes of consulting the excellent handbook.
@RL_Dane
Yeah, FDE is the only reason I'm not daily driving Void Linux. :P
Well, I'd probably still run NixOS if they added it now, but I'd never have tried NixOS if Void Linux had FDE because I would have stuck there.
@benjaminhollon @RL_Dane Have you tried vim9script?
@RL_Dane
Just discovered something awesome: lightspeed.nvim is like vim-sneak, but taken to a whole new level. I'm loving it.
Neat!
I actually have vim-sneak installed, but I always forget to use it.
I'm loving g+hjkl
@RL_Dane
You've gotta use vim-sneak; it's fantastic. ;)
And make sure you have this:
let g:sneak#label = 1
That'll enable label mode; if there are more than one match, it'll put a label on each following match (qutebrowser style) so you can with a single keystroke specify which match you want. It's a game changer.
@RL_Dane @benjaminhollon for me, one of the biggest benefits of neovim is it's support for LSP (language servers) which provide things like formatting, refactoring, go-to definition, and things of the like.
@elijahmanor @RL_Dane
Hmm I need to get into that at some point; so far I was recreating my vim config and adding a few extra goodies.