|
Neon Noodle posted:Well they got rid of the Escape key on the new Macbook so gently caress vi, obviously. Ctrl-[ is a much more convenient shortcut for Esc in vim anyway, since each key is within normal typing distance.
|
# ? Dec 12, 2016 15:48 |
|
|
# ? May 11, 2024 16:00 |
|
horse mans posted:Ctrl-[ is a much more convenient shortcut for Esc in vim anyway, since each key is within normal typing distance. Sure, if you use an American keyboard.
|
# ? Dec 12, 2016 16:24 |
|
Hollow Talk posted:Sure, if you use an American keyboard. How many people don't use an American keyboard? 30, 40 people tops?
|
# ? Dec 12, 2016 17:01 |
|
Neon Noodle posted:Well they got rid of the Escape key on the new Macbook so gently caress vi, obviously. yeah it doesn't matter, every serious vim user rebinds escape, ctrl, etc, to better things.
|
# ? Dec 12, 2016 17:09 |
|
MALE SHOEGAZE posted:yeah it doesn't matter, every serious vim user rebinds escape, ctrl, etc, to better things. What serious vim users? Most vim users are just using it because some other techbro on HN said it was the way to really crush code when getting down to the metal with Node.js.
|
# ? Dec 12, 2016 17:54 |
|
Spacemacs' evil-mode defaults escape to pressing f and d at the same time and I've grown to really like it. It seems like it would get in the way, but I've never accidentally triggered it and the ergonomics are much nicer.
|
# ? Dec 12, 2016 18:12 |
|
eschaton posted:What serious vim users? Anyone who stops for 10 seconds to think "wow, I press these buttons all the time and they're in terrible spots, maybe I should rebind them." Or perhaps "wow, this button does not exist anymore, perhaps I should rebind it, oh wow this is even better!"
|
# ? Dec 12, 2016 18:20 |
|
MALE SHOEGAZE posted:Anyone who stops for 10 seconds to think "wow, I press these buttons all the time and they're in terrible spots, maybe I should rebind them" Lots of people probably just rebind CAPSLOCK as their ESC key, which is a lot more convenient. Of course, serious users use CAPSLOCK as Hyper key for their tiling window manager in order to not clash with their myriad of Emacs keybindings.
|
# ? Dec 12, 2016 18:22 |
|
Hollow Talk posted:Lots of people probably just rebind CAPSLOCK as their ESC key, which is a lot more convenient. yeah I'm using a model m for a month now, and this is the first thing I did.
|
# ? Dec 12, 2016 18:29 |
|
horse mans posted:How many people don't use an American keyboard? 30, 40 people tops? This is true. I'm in the U.K., but only use USA keyboards. Plus we're talking about MacBooks, the UK Apple keyboard is a sick joke.
|
# ? Dec 13, 2016 08:40 |
|
Hollow Talk posted:Lots of people probably just rebind CAPSLOCK as their ESC key, which is a lot more convenient. Karabiner has a neat thing where you can use return as control if you press something else before you lift your finger up. That's clever, but it would be much more useful to me if I could bind it to Hyper.
|
# ? Dec 15, 2016 14:40 |
|
Siguy posted:Spacemacs' evil-mode defaults escape to pressing f and d at the same time and I've grown to really like it. It seems like it would get in the way, but I've never accidentally triggered it and the ergonomics are much nicer. Wait really? I've been using jj pressed less than a half second apart, but this sounds better (rebound to "eu" or "ht" for Dvorak). Know how to rebind it?
|
# ? Dec 18, 2016 20:05 |
|
It looks like spacemacs' author released this functionality as a package: https://github.com/syl20bnr/evil-escape
|
# ? Dec 19, 2016 05:09 |
|
Hey emacs guys. I've been using emacs for a week and I was wondering about some things: If I'm using the doc viewer to read a pdf from within emacs, is there a way to save it so that the next time I open emacs it opens at the same page I was at? Is there a way to list all the folders associated with a project while I code? I've been opening up a shell and using a cli file manager just to keep track, but I was hoping there was something a bit more seamless. While I'm at it, can I make it start with split windows? So one for terminal, one for pdf, one for editing code? Is there a way to switch buffers between split windows more reliably then M-x ido-mode? Like instead be able to do M-x 1, 2 ,3 to switch around from file to file? Can I boot into emacs instead of X and still read PDFs? It sounds odd, but what I really like about emacs is that it is so inclusive and I never have to leave it, and I think the next step would be just to start in emacs and use it as a windows manager, but I'm not sure if that's possible.
|
# ? Dec 21, 2016 16:00 |
|
lemonslol posted:Hey emacs guys. I've been using emacs for a week and I was wondering about some things: quote:Is there a way to list all the folders associated with a project while I code? I've been opening up a shell and using a cli file manager just to keep track, but I was hoping there was something a bit more seamless. This is a whole genre of packages, generally termed "project managers". The big one is projectile, which lets you create projects based on version control repos or folders or really anything, and then once you're in a project has a lot of utilities for e.g. grepping around within the project, running tags searches, opening files in it, etc. It even integrates well with helm, which it seems like you're already using! I use this every day, and my only problem with it is I haven't quite gotten projectile, helm, and perspective quite all working together yet. quote:While I'm at it, can I make it start with split windows? So one for terminal, one for pdf, one for editing code? At least in projectile, and probably in other project managers, there's a provided hook called code:
quote:Is there a way to switch buffers between split windows more reliably then M-x ido-mode? Like instead be able to do M-x 1, 2 ,3 to switch around from file to file? - If this is happening when you're switching between projects, so you have your | pdf | term | code | setup for project A and want to switch to your | pdf | term | code | setup for project B, this is something that perspective will do - once you get a project open, doing code:
quote:Can I boot into emacs instead of X and still read PDFs? It sounds odd, but what I really like about emacs is that it is so inclusive and I never have to leave it, and I think the next step would be just to start in emacs and use it as a windows manager, but I'm not sure if that's possible. http://www.howardism.org/Technical/Emacs/new-window-manager.html
|
# ? Dec 21, 2016 17:11 |
Hey so I'm trying to set up flycheck with a C++ project, but I can't get it to find boost files and I can't seem to find the answer online. I think I must be missing something obvious. My .dir-locals.el file is: Lisp code:
C++ code:
However, /usr/local/include/boost/optional.hpp definitely exists and this whole thing compiles just fine with clang. So what stupid thing am I doing wrong? Edit: Welp, I added an extra set of parentheses around the whole thing and it seems to have fixed things. I'm not really sure I understand why that made a difference, so I'm gonna change my question to that. VikingofRock fucked around with this message at 06:12 on Jan 14, 2017 |
|
# ? Jan 14, 2017 01:50 |
|
VikingofRock posted:Edit: Welp, I added an extra set of parentheses around the whole thing and it seems to have fixed things. I'm not really sure I understand why that made a difference, so I'm gonna change my question to that. The contents of .dir-locals.el is a list (the top level of parentheses after you fixed your file) that can contain multiple mappings (each mapping being your second level of parentheses, a cons of a mode and an association list). What you had in that file before you fixed it was just one mapping. See a clearer example: https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html
|
# ? Jan 14, 2017 07:20 |
There Will Be Penalty posted:The contents of .dir-locals.el is a list (the top level of parentheses after you fixed your file) that can contain multiple mappings (each mapping being your second level of parentheses, a cons of a mode and an association list). What you had in that file before you fixed it was just one mapping. See a clearer example: Oooh that makes sense. I really need to go through some more lisp tutorials sometime to make this all more intuitive.
|
|
# ? Jan 14, 2017 10:03 |
|
I need something to clock in. I'm not sure how org-mode works, but from what I read it's not exactly what I'm looking for. I have to bill hourly, and I wanted to bill only the time I spend in emacs, so if I tab over and open firefox to watch porn, I want the timer to stop. However, if I open a browser within emacs, presumably to do work related things, I want that to go into the timer. Does anyone know of anything with that functionality, or how I could hack something to have that functionality ?
|
# ? Jan 18, 2017 01:35 |
|
lemonslol posted:I need something to clock in. I'm not sure how org-mode works, but from what I read it's not exactly what I'm looking for. I have to bill hourly, and I wanted to bill only the time I spend in emacs, so if I tab over and open firefox to watch porn, I want the timer to stop. However, if I open a browser within emacs, presumably to do work related things, I want that to go into the timer. Does anyone know of anything with that functionality, or how I could hack something to have that functionality ? https://www.rescuetime.com/ I think this might be what you want. I haven't used it in a very long time, but from what I remember (and I couldn't even remember the name without googling a bit) it would track time spent in each application you run. So you'd get a report on duration for each application as the top/active window. So your work in emacs would all be totaled together, and a separate timer for Chrome/Firefox and another for Solitare/whatever. It might even break time spent on each specific website down separately so you know how much time you waste on SA vs work related websites.
|
# ? Jan 18, 2017 04:25 |
|
I used rescuetime to ... rescue my PhD thesis writing. You would be surprised how many unproductive hours you spend online on a given work day.
|
# ? Jan 19, 2017 11:27 |
|
Beef posted:I used rescuetime to ... rescue my PhD thesis writing. You would be surprised how many unproductive hours you spend online on a given work day. I think it's wrong to see this as "wasted" or "unproductive". I need it to deflate, otherwise my mind would go boom. But depends if you can't control it, or use it to evade work. I guess.
|
# ? Jan 19, 2017 11:41 |
|
I do not mean to say that unproductive hours are wasteful. Deflating works best on stuff that is absolutely unproductive and useless! What I meant was that after a 9 hours work day, I was really surprised to see how that somehow 6 hours of that were spent on stuff like SA and reddit (and I hate reddit). Waaay beyond attributed break time. I need to take short breaks and often, but I apparently was spending too long on any break than I subjectively realized.
|
# ? Jan 19, 2017 13:24 |
|
Would that program work if I was ssh'd into a box somewhere else? I haven't figured out yet how to do M-x SSH, or tramp mode yet so I wouldn't be running emacs locally.
|
# ? Jan 20, 2017 13:52 |
|
lemonslol posted:Would that program work if I was ssh'd into a box somewhere else? I haven't figured out yet how to do M-x SSH, or tramp mode yet so I wouldn't be running emacs locally. tramp mode is the easiest thing in the world. you literally just need to do find-file normally and then enter a filename like /user@hostname:/path/to/file and emacs will handle the ssh connection stuff transparently.
|
# ? Jan 20, 2017 20:07 |
|
Would that you could just use //nodename/path/to/file…
|
# ? Jan 20, 2017 20:22 |
|
what about if I want to just be on the other box not just open a file?
|
# ? Jan 21, 2017 00:14 |
|
lemonslol posted:what about if I want to just be on the other box not just open a file? Open a directory instead, you get a remote dired buffer and any commands you execute are run on the other end
|
# ? Jan 21, 2017 13:43 |
|
Hey guys so I wanted to key bind a theme in Emacs, with this code here:code:
Also I was wondering if there was a way to make it so when I press a modifier it would come up immediately in the buffer rather than waiting 1 second to see if I hit C-x or something. Been trying to google this for hours but can't seem to get a clear answer. Thanks for any help as usual .
|
# ? Feb 22, 2017 19:17 |
|
Nude posted:Hey guys so I wanted to key bind a theme in Emacs, with this code here: Basically, the problem here is that load-theme is defined interactively, as per (interactive-form 'load-theme) code:
The normal way to execute this would be (command-execute 'load-theme), which calls (call-interactively 'load-theme) internally. However, that means the function call still tries to honour the interactive definition, which means it still tries to get the theme name from the minibuffer, because the command loop looks for that. GNU Emacs Lisp Reference Manual posted:The interactive form must be located at top-level in the function body, or in the function symbol’s interactive-form property (see Symbol Properties). It has its effect because the command loop looks for it before calling the function (see Interactive Call). Once the function is called, all its body forms are executed; at this time, if the interactive form occurs within the body, the form simply returns nil without even evaluating its argument. So if you supply your own call to interactive first, the rest will be run as-is, i.e. in this case without paying attention to its own interactive definition. Since global-set-key doesn't take interactive functions, your version yields an error while (global-set-key (kbd "C-c a") (lambda () (interactive nil) (load-theme 'tao-yang))) works. Since lambda is the function in this case, calling an empty interactive function (both (interactive) and (interactive nil) work) means the rest of your function body gets executed as is, which means this essentially binds (load-theme 'tao-yang) "non-interactively", letting you supply the argument directly by "overriding" its internal interactive function. It's...not great design. tl;dr: After calling interactive once, all subsequent calls to interactive in the function body get treated as nil.
|
# ? Feb 22, 2017 20:08 |
|
Hollow Talk posted:Basically, the problem here is that load-theme is defined interactively, as per (interactive-form 'load-theme) Ah thank you, you saved me from a headache, the problem was I was misunderstanding why (interactive) was being used for the lambda examples. But thanks for clearing it up, also I found out my second question the keyword I was looking for was: Echo Area, with the variable (setq echo-keystrokes .1). Thanks for the help .
|
# ? Feb 22, 2017 23:58 |
|
It wouldn't work even if load-theme wasn't interactive. You can't bind non-interactive functions (you can only call them from other interactive functions), and global-set-key expects the binding arg to be "a keymap, a command, a keyboard macro, a symbol that leads to one of them, or nil." That lambda would do just fine, as would the symbol of an equivalent interactive named function. I prefer the latter to avoid cluttering up e.g.helm-descbinds or which-key: code:
|
# ? Feb 23, 2017 06:07 |
|
A quick 'thank emacs' to start the week: # Hi-lock: (("ymm3" (0 (quote hi-blue-b) t))) # Hi-lock: (("ymm2" (0 (quote hi-green-b) t))) # Hi-lock: (("ymm1" (0 (quote hi-red-b) t))) # Hi-lock: (("r9" (0 (quote hi-pink) t))) # Hi-lock: (("[Vv]movups" (0 (quote hi-black-hb) t))) Just made trawling through lovely Eigen-emitted assembly several magnitudes more readable, without having to enter the highlight rexexps every time. Being able to dump your file-specific configurations in the file itself is something that I'de wish more editors/IDEs would steal.
|
# ? Feb 24, 2017 10:43 |
|
|
# ? May 11, 2024 16:00 |
I use emacs sometimes, not enough to have any real proficiency with it but I can install stuff and change modes and edit text which I guess is nice, and my big thought on these all-keyboard editors is that I always kind of sneer at them when I am on my thinkpad and have the mouse on the home row, but when I get to my desktop with a standard mouse, it does seem like a hassle. I am just a hobbyist and a newb though so my coding has never in my life been limited by my typing speed so much as my thinking and googling.
|
|
# ? Feb 24, 2017 21:07 |