This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-21
Channels
- # beginners (5)
- # boot (15)
- # capetown (1)
- # chestnut (2)
- # cljs-dev (9)
- # cljsjs (3)
- # cljsrn (1)
- # clojure (190)
- # clojure-brasil (2)
- # clojure-greece (14)
- # clojure-italy (3)
- # clojure-poland (8)
- # clojure-romania (1)
- # clojure-russia (2)
- # clojure-serbia (3)
- # clojure-spec (38)
- # clojure-uk (98)
- # clojure-ukraine (2)
- # clojurescript (65)
- # clojurex (1)
- # core-async (16)
- # cursive (16)
- # datomic (3)
- # defnpodcast (7)
- # emacs (11)
- # funcool (2)
- # hoplon (16)
- # jobs (1)
- # leiningen (4)
- # lumo (9)
- # off-topic (2)
- # om (1)
- # other-languages (1)
- # protorepl (1)
- # re-frame (50)
- # reagent (16)
- # reitit (32)
- # remote-jobs (1)
- # rum (1)
- # shadow-cljs (73)
- # spacemacs (36)
- # specter (21)
- # sql (6)
- # unrepl (107)
- # untangled (4)
@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: https://yanpritzker.com/learn-to-speak-vim-verbs-nouns-and-modifiers-d7bfed1f6b2d
& in conjunction with that, be aware that SM will let you define your own text objects, which are then combinatorially valuable.
@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.
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 🙂
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
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.
Ah, found at least a brief summary: http://spacemacs.org/doc/DOCUMENTATION.html#additional-text-objects
& documentation of the indent text object at http://spacemacs.org/doc/DOCUMENTATION.html#region-selection
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 😉
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 (https://emacs.stackexchange.com/questions/16497/how-to-exclude-files-from-projectile) but I've never gotten it to work.