This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-16
Channels
- # beginners (115)
- # boot (13)
- # boot-dev (13)
- # chestnut (1)
- # cider (1)
- # clara (10)
- # cljs-dev (21)
- # cljsjs (1)
- # cljsrn (2)
- # clojure (120)
- # clojure-dusseldorf (2)
- # clojure-greece (13)
- # clojure-ireland (1)
- # clojure-italy (3)
- # clojure-nlp (3)
- # clojure-russia (2)
- # clojure-spec (13)
- # clojure-uk (82)
- # clojured (5)
- # clojurescript (47)
- # core-async (2)
- # core-logic (8)
- # cursive (45)
- # datomic (2)
- # editors (1)
- # emacs (39)
- # fulcro (166)
- # graphql (1)
- # hoplon (16)
- # keechma (5)
- # off-topic (202)
- # perun (4)
- # protorepl (7)
- # re-frame (28)
- # reagent (13)
- # ring (27)
- # ring-swagger (16)
- # rum (1)
- # shadow-cljs (25)
- # spacemacs (20)
- # sql (141)
- # yada (4)
how do you all typically search for usage of a variable or any other text across all your project files? i used to just keep all my files in a flat directory so i could grep at the command line. as projects grow this is not practical, putting stuff into source directories makes more sense, but it breaks this habit
I use this to search for text in project. https://github.com/Wilfred/ag.el . it's very quick
I typically use the project search features of Projectile https://github.com/bbatsov/projectile
Heavy it want sense? It just introduces a concept of a project defined by some project marker file and lots of operations you can do with that that project.
For me things like finding files in project, jumping between code and test and switching projects are invaluable.
so if my project is already in a git repo, projectile will just automatically search within just the fils of that repo with no other setup (other than installing projectile) >?
I'm using hydra, and I have an entire "hydra" dedicated to projectile related commands "browing project, finding files by name, grepping-aging through all in projectile, search/replace in project"
trying projectile, what is difference between C-c p f and C-c p g ? what does "at point" refer to when looking for a file?
> afaik you can be in only one major mode and many minor modes actually had forgotten about this 🙂 thanks for the hint
can anyone recommend a replacement for neo-tree? it's pretty good but a bit buggy, the "up a dir" feature doesn't work for me for some reason. I like having a tree of the project appear on the side with a keybinding
I use project-explorer
with some additional setup and helper functions
I'd say it basically works OOTB, but getting to a fully satisfactory state got me some pain (which I haven't extracted as a lib unfortunately)
> i find it interesting that projectile-grep works even if projectile-mode is disabled
projectile-mode
is just a container for the default keybindings, no Emacs command needs some mode to be enabled for it to be invoked.
Using major-mode
and eq
won’t work for derived modes, which generally are consistent with the parent mode.
> trying projectile, what is difference between C-c p f and C-c p g ? what does “at point” refer to when looking for a file?
Thanks for the pointer! I was using a weaker check, something like (string-contains? (str major-mode) "clojure")
If point is on a filename, Projectile first tries to search for that
file in project:
- If it finds just a file, it switches to that file instantly. This works even
if the filename is incomplete, but there's only a single file in the current project
that matches the filename at point. For example, if there's only a single file named
\"projectile/projectile.el\" but the current filename is \"projectile/proj\" (incomplete),
`projectile-find-file-dwim' still switches to \"projectile/projectile.el\" immediately
because this is the only filename that matches.
- If it finds a list of files, the list is displayed for selecting. A list of
files is displayed when a filename appears more than one in the project or the
filename at point is a prefix of more than two files in a project. For example,
if `projectile-find-file-dwim' is executed on a filepath like \"projectile/\", it lists
the content of that directory. If it is executed on a partial filename like
\"projectile/a\", a list of files with character 'a' in that directory is presented.