Yes, for example I use the "environment" object from the vimtex plugin.
They can't actually add real objects (that you can use with counts, for instance) without a lot of scripting. Vim doesn't have abstraction for objects that would allow you to easily define some.
Vim doesn't have abstraction for objects that would allow you to easily define some.
Hum ?? Your pgrasing is ambiguous so I'm not sure what you mean, but as for creating text objects, it's pretty straightforward: operator-pending mappings.
I meant that you can't define a real object and instead have to rely on visual mode and operator pending mode mappings that might quickly get complicated if you want them to have the same features as the built-in ones have
I hear you, but am not an expert in this area of vim so would you mind showcasing a practical example of where a user-defined text object would behave differently ?
"Around" is a bad mnemonic. It's ambiguous, and in the most literal sense of the word it's false. It can very easuly mislead beginners. "delete a <something>" is the most unambiguous phrasing.
"delete a <text object>" is what the documentation says. I think that is unfortunate, because both diw and daw delete a word, so using "a" does not give any clue about how it works.
I personally use "around" since it describes the action much better: it selects the text object and the space up to the next text object (or to the previous object if at the end). I can then paste in a text object seamlessly since it already has a bit of space around it. Also, when the text object has some kind of brackets of quotes, something like ab or a} literally works around the object.
I get it, vim is not for everybody. But if you think about it, why most if not all editors/ide have some sort if “vim” mode? It’s because it’s that good. Once you learn it, it’s hard to go back. And with LSP integration, it opens a lot of modern tooling to it’s tool-belt, without sacrificing speed and efficiency.
I mainly write JavaScript. I used to use VSCode for it. Then, I tried NeoVim and I have to say that VSCode with VIM keybindings doesn't even get close to power that NeoVim gives me. There are plugins for the tools "of this generation". I have ESLint integration, Intellisence etc.
The only thing that I haven't tried yet is debugging from NeoVim.
I think it's far from obsolete and far from archaic.
I went from Visual studios to notepad++ to VSCode to Vim.
Why did I? Because everything else is slow as shit, overencumbered, huge file size, and typically only compatible within its own ecosystem.
Granted things have come a long way, but it's still not perfect.
I write code everyday. I use Visual Studios for my unit testing (don't ask) and within the time it takes to boot up VS, I often have already opened the file and made the change in vim. I'm not joking.
I have VS and VSCode both with a vim plugin. And it's still slow as trash. I'm talking execution speed. I just want to change a single line of text, for fucks sake I should have used SED.
lastly, compatibility. Vim is everywhere. I can hope on any Linux machine and there it is. If I am on windows, download git and vim comes with it.
I will never be without the ability to modify code anywhere anymore. I am no longer dependent on proprietary tooling and file types. I know more about software development, frameworks, compiler tool chains than I ever thought I would; all as a result of trying to build a better vim worflow. And you know what? I now know that all those other build systems are bloated pieces of shit.
Depends whether you spend hours in an editor just editing the content of files, or you are using cli programs interspersed with editing files having the context of a working directory.
A common workflow is to jump around directories editing config files and source code all over the place while running scripts and Makefiles etc. That isn't nearly as efficient in VSCode vs a regular terminal session + vim.
16
u/LoneHoodiecrow Dec 10 '20 edited Dec 10 '20
I'm afraid that this is more or less true.
Doubly true, since I don't have a lot of money or status.
(Since I don't seem to be able to upload images in a comment, have a look at my simple .jpg image meme (created by memegenerator at imgflip, uh, .com): https://www.dropbox.com/s/awrv1pxmgls2sak/4pt9wp.jpg?dl=0)
59
u/princker Dec 10 '20
11
u/emax-gomax Dec 10 '20
I h8 it... because it's true (* ಠ_ಠ)
8
u/aromaticfoxsquirrel Dec 10 '20
I guess? I spend a lot of time ssh-ed into headless machines so it's kinda what you get.
7
u/loveofcode Dec 10 '20
I get it, vim is not for everybody. But if you think about it, why most if not all editors/ide have some sort if “vim” mode? It’s because it’s that good. Once you learn it, it’s hard to go back. And with LSP integration, it opens a lot of modern tooling to it’s tool-belt, without sacrificing speed and efficiency.
11
u/[deleted] Dec 10 '20
Im still trying to get out of vim
4
u/bindian0509 Dec 10 '20
For me it's writing docker files using vim
4
u/Mvagustacpa Dec 10 '20
I use vim.
4
u/[deleted] Dec 10 '20
I’ve reached peak nerd when I realized I have literally no one I know IRL who knows about vim.
3
u/[deleted] Dec 10 '20
how about writing your own code editor and using it xD
3
u/acousticpants Dec 11 '20
Rock hard all day
3
u/desmap Dec 11 '20 edited Dec 12 '20
+ touch-typing+ a 40% board or layout
2
u/nesousx Dec 10 '20
MS Paint
2
u/ChevalOhneHead Dec 10 '20
:!q Power of God 😉
1
u/Honestly__nuts Dec 10 '20
Can confirm.
1
u/[deleted] Dec 10 '20
I think it's more about reading vim doc and teaching new cool stuff
-24
u/[deleted] Dec 10 '20 edited Oct 20 '24
angle combative deserted include hateful slap market juggle escape cagey
This post was mass deleted and anonymized with Redact
0
u/[deleted] Dec 10 '20
[deleted] — view deleted comment
0
u/[deleted] Dec 10 '20
[deleted] — view deleted comment