News for hackers. Stuff that matters.
Re:Vim Boss by petre on Thursday August 10, 2023 @05:03PM (#37081757)
> As soon as I read "programmable", I'm off. I just prefer fixed-function editor that suits my taste

I never have to "program" Vim apart from set nocompatible, set ruler, backspace, indentation and maybe pick another colorscheme from the defaults (usually torte).

On neovim I installed lightline and pathogen, monokai colorscheme and something else I forgot about, maybe syntax highlighting for some more exotic language.

The point is Vim is a fixed function editor until you start loading it up like a xmas tree.

Re:Vim Boss by gorjusborg on Thursday August 10, 2023 @06:00PM (#37082328)
> The point is Vim is a fixed function editor until you start loading it up like a xmas tree.

Exactly, just because you can doesn't mean you need to, or should.

Re:Vim Boss by imron on Thursday August 10, 2023 @07:13PM (#37082934)
My .exrc file is < 10 lines and that + ctags is enough for me to use vim for daily development across multiple languages.
Re:Vim Boss by petre on Friday August 11, 2023 @01:58AM (#37085554)
My .vimrc:

  set nocompatible
  set backspace=2
  set noexpandtab copyindent preserveindent softtabstop=0 tabstop=4 shiftwidth=4
  set ruler
  colorscheme torte
Vim is what I mainly use out of habbit. It only requires typing vim as opposed to nvim.

Neovim's init file has this plus more stuff to turn off features like showmode, keybinding for nohlsearch, SQL autocomplete and space indentation for python. Maybe some of those annoying defaults are set up by one of the plugins. It's loaded with up with three plugins: lightline, vim-polyglot and vim-visual-multi which I forgot how to use and wonder why it was loaded in the first place. Polyglot is loaded because I needed syntax highlighting for some more exotic language like Crystal, D, Dart or TOML. Apart from that it uses the monokai-tasty colorscheme. So basically this is my setup. If I open anything in vim that doesn't have syntax highlighting and I find it annoying, I would just close the file and open it in nvim instead. I think Polyglot also helps with Racket.

I've also tried helix and kakoune but find the popup menus quite annoying.

Re:Vim Boss by snvzz on Friday August 11, 2023 @02:15AM (#37085653)
>Vim is what I mainly use out of habbit. It only requires typing vim as opposed to nvim.

I got used to typing vi instead. It's shorter

    alias vi=vim
becomes

    alias vi=nvim
Re:Vim Boss by petre on Friday August 11, 2023 @02:51AM (#37085862)
It also works on fresh linux installs without the "damn I forgot to install vim" moment.
Re:Vim Boss by Fnoord on Friday August 11, 2023 @06:19AM (#37087018)
On a Debian(-based) system, you can play with update-alternatives

https://manpages.debian.org/bookworm/dpkg/update-alternative...

I just want vim to be aliased to it though, since if I type vi I want something very light and quick (my nvim is bloated ;)

Re:Vim Boss by smueller1234 on Friday August 11, 2023 @02:56AM (#37085885)
While we're at sharing neat vim configs, here's the one I was quite happy with at the time: I got tired of indent style arguments. I don't care. So I wrote a little heuristic to detect indent style, then configured vim with my preferences, and added this to .vimrc:

> map <F5> <Esc> :perl use Text::FindIndent;VIM::DoCommand($_) for Text::FindIndent->to_vim_commands(join "\n", $curbuf->Get(1..$curbuf->Count()));<CR>

Text::FindIndent is the aforementioned heuristic as a Perl module. Sorry for the mangled quote, original at https://metacpan.org/pod/Text::FindIndent

When I work on existing code, I hit F5 and work within the author's preferences.