Fork me on GitHub

@alexkeyes more than anything, I'd read this article. If it's something you already intuitively get, it won't give you much, but it took me a long time of vimming to really grasp it. Quick read:


& in conjunction with that, be aware that SM will let you define your own text objects, which are then combinatorially valuable.


(as well as, of course, your own verbs)


@eggsyntax currently reading the article you sent - thanks for sharing


and to respond to your second point - i have actually defined my own keyboard commands before, when using the Spotify app. It was a pretty cool experience and it definitely helped give context to how Spacemacs works and the philosophy behind using the spc bar as a leader key


Well, to clarify, IMHO defining a new text object goes somewhat beyond defining a keyboard command, because text objects are the "nouns" in the article -- so for example if you define a sexp text object (which some layers already do, of course), you can use it with every verb vim/SM supports.


oh I see!


yeah I’ve never done that hahah


I've only done it once or twice, since most useful text objects are already defined, but on those rare occasions it's been incredibly powerful 🙂


that article was really helpful!


I guess what I’ve been trying to get at lately is some kind of cheatsheet so that I know I know all the possible verbs and nouns


Ah, yeah, I know there's cheatsheets out there, but I don't know a good one offhand.


I guess ones I don’t know means that I probably am not going to find them too useful in the future but IDK


yeah I’ll keep looking and if I come across one I’ll post it here


fwiw by default spacemacs has extra motions and operators built in that aren't in vim


the argument and symbol text objects are particularly helpful


that’s interesting


I mean my only use of ‘real’ vim is when I need to edit a text file or something on a server that isn’t my localhost


@chris do you happen to know where that's documented? Just googled and not coming up w/ it so far.


oops there's a bug on there \vert should have been expanded to |


but that's more helpful than I've ever seen


when you guys are using visual mode do you directly enter it or do you just user the v command as needed?


for example, more often than not I find myself using the V or v[somenouns] to select things instead of directly entering visual mode with SPC v


I pretty much never do SPC v. I think (perhaps mistakenly) of v as entering visual mode, and then I move around as necessary. Bonus protip -- while in visual mode, o will jump the cursor to the other end of the selection. That's one I wish I'd known way sooner 😉


oh that’s a major key!


thanks for sharing


I’ve been practicing visual mode via vimum in the browser that’s been helpful for general vim knowledge as well. plus it feels great to browse the web exclusively from the keyboard


(except: once I'm already in visual mode, I do occasionally do SPC v to expand the selection, but usually I find it faster to just use regular movement commands)


don't forget you can do vi(, vi[ vit etc. as "in" and va(, va[ as "a", you can select things between parens, brackets, tags, quotes etc. you can also quickly reselect things with gv


Anyone know a version of find-file (or projectile-helm, or any of the other file search tools) that either limits itself to source files, or preferentially lists source files? I mostly use projectile-helm, but often the first option is some haml file or other non-source file that's only very rarely what I'm looking for. Or, failing that, a way to exclude certain filetypes? Projectile supposedly has that ( but I've never gotten it to work.


afaik it ignores files in .gitignore


Not stuff I can .gitignore, unfortunately, but good thought 🙂 I'll probably take another stab at doing it with projectile-globally-ignored-file-suffixes


& actually go dig into the source code for it this time...


I haven’t had any issues - projectile-helm works well for me