hello vimmers, A. The problem * the use of expansions like <cfile> is very powerful but typing those are boring and error prone ( < cfile> is a shell redir) * sometimes it can be really usefull to have the content of <cfile> as an exported variable. * environment variables have autocompletion, vim expansions doesn't :r!dpkg -r <cfile> B. The solutions There are many but I came to the idea that the most reusable feature would be the ShellCmdPre autocommand (ShellCmdPost already exists). I have no time to dive into vim developpement but if needed, I'll be happy to sponsor it (I think Christian Brabandt asked for financial help so he can spend more time on vim) thanks for any feedbacks. C. The context In few months, I'll give a new version of the talk "acme changed my life" https://github.com/eiro/talk-acme-changed-my-life in which I explain that "!" by far the most underated feature of vi and all its clone and the basics of it. In this new version, I'll instist on another underated features: vim expansions with expressions like :e <cfile>/README :r!dpkg -r <cfile> and the way it can interact with features outside of vim. as exemple: if you have suffix aliases set up in your ~/.zlogin, you can just type :!<cfile> to open a file. you can possibly map it to something like <space>x as it's really generic. but there the problem I mentionned before and what I really would like is to introduce something like au ShellCmdPre { $f = expand('<cfile>') $F = expand('<cFILE>') $w = expand('<cword>') $W = expand('<cWORD>') } so now I just need to type :!$f -- Marc Chantreux -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_use/ap1BfcqicUzqw5IA%40prometheus.
Sunday, September 6, 2026
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment