@janantos BTW, only auto-complete I tend to use is CTRL-x-CTRL-f which auto-completes path in a vim buffer ;-) For symbol lookup in Rust I use rusty-tags.
rusty-tags also lookup through the sources of the external crates, stdlib etc., given that I have this in .zprofile
:
# rusty-tags
[ `command -v rustc` ] && RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/library/
[ -d $RUST_SRC_PATH ] && export RUST_SRC_PATH
And in my .vimrc
I have:
# rusty-tags
autocmd BufRead *.rs :setlocal tags=./rusty-tags.vi;/,$RUST_SRC_PATH/rusty-tags.vi
autocmd BufWritePost *.rs :silent! exec "!rusty-tags vi --quiet --start-dir=" . expand('%:p:h') . "&" | redraw!
I think it like that if I downshift the phase of code I write then I think it through better, and in the end I tend to save time, and have more in-depth understanding of the system I’m working with. With ctags integration I still get quickly to the API references given that they are inline the source code.
My philosophy is that it is better to use software that does not require any plugins in order to work it for you. E.g. I’d rather install VSCode than try to make vim/neovim work like VSCode. This is why I have Sublime Text license for meetings, doing graphs with Mermaid and stuff like that.
@pinkforest @johnnydecimal @danderson Because we live in open source supermarket ATM ;-)
Back in the day when software was not working, you read the manual, and learned all the details, and finally mastered software.
These days something not working as expected:
Quite often plugins just dumb down the feature that was pre-existent already in the original software, if the manual was read ;-)
Nice trick in Aerc that I just learned to share IMAP account for personal and kernel.org account:
~ main
❯ cat .config/aerc/folder-maps/kernel.map
personal = INBOX
INBOX = kernel
~ main
❯ grep folder\-map .config/aerc/accounts.conf
folder-map = ~/.config/aerc/folder-maps/kernel.map
Should be self-explanatory ;-)
@janantos I actually tried for week or two last Dec but being used #vim from 1998, I quickly realized that I’m more or less a lost case ;-)
I.e. nothing wrong in the editor but it is not Vim. I also used NeoVIM for couple of years but even that did not work out because of quite minor details in implementation do not work exactly as in Vim (one example is interactive shell command e.g. :!sudo rm -rf /
).
So I’ve stopped trying to change myself in this area ;-)
One of the most important things to understand in Vim are @:
and @@
. After learning them, there is rarely need mapping ex-mode stuff to keyboard shortcuts.
Already plain vim has two languages: the operator language and vimscript. By learning all the cool tricks of the former, it is often case that there is no need to do anything with the latter. Often plugins are installed because of lack of knowledge in the operator-language ;-)
@chrisdenton So I noticed now that replacing rs file with ANSI escape sequence of any kind but long enough makes rustc to throw error dump like the one I got.
E.g.
\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)\1\e[38;5;015m\2uu\1\e[0m\2\1\e[38;2;191;254;33m\2(ins)
works pretty well ;-)