The purpose of this PR is to set the default for ⌘ to `hyper' and to provide the
function `kbd-mac-command` to replace `kbd' when defining keybindings for ⌘ in
case someone decides to explicitly set osx-command-as to `super' or `alt'.
There are problems setting osx-command-as to `alt' and `super',
so we use `hyper' as a default instead because, for example:
- Using `alt': Command-x or Command-m inserts, respectively: × µ
- Using `super': Control-Command-f produces keycode: <C-s-268632078>
Setting to `hyper' seems to avoid both types of the above problems.
Also, while it is possible, it is not recommended to set to `meta'
since standard OSX shortcuts would overshadow important keys such
as M-x.
Two other small changes include:
- Commenting out the code that defines <C-s-268632078> (C-s-f) since it is
unnecessary if we use `hyper' as the default; and if we really want to use
`super' then we should figure out how to solve the weird keycode issue.
- add keybinding for ⌘` (Command-backtick) to `other-window'.
Emacs usually swallows this keystroke, so other-window basically restores
the default behavior that most Mac OSX users would expect.
For now realug is used only to C and C++ so it makes more sense to add it to
the c-c++ layer for now.
Later if we can generalize the support of realgud for other languages and we
can start a debugger layer.
The `scala-enable-eldoc` variable should be used to determine whether or not
ENSIME should print types at point. This makes sure that the hook is only set if
the variable is non-nil.
Dolists for `spacemacs/set-leader-keys-for-major-mode' were using
'emacs-lisp-mode instead of the loop variable 'mode'. Hopefully using the loop
variable was the intention.
I also updated the redundant bindings for `edebug-mode-map' and
`edebug-eval-mode-map' to use `dolist'. It probably makes more sense to put the
whole thing after :bindings rather than around it, but I wasn't sure if that
might break something.
problem: SPC C c was defined in the org layers :config section, which
runs when a .org file is loaded
solution: move the definition to the :init section, so that it loads on
startup, like SPC a o c and C-c c
Emacs doesn't handle long line lengths very well. If you accidentally rg a file
a file that has very long line lengths it can freeze emacs. This prevents rg
from returning any results with more than 150 characters. Instead, it will
indicate that there were results in that file but they were elided.
This commit adds two configuration variables to the slack layer allowing a user
to customize the name and keybinding of the slack custom layout, following the
conventions from the erc and mu4e layouts.
This commit adds a custom layout for mu4e related buffers. Four different major
modes are used in mu4e buffers based on their purpose, so a function is used to
add buffers in these modes to the new layout. This setup is largely based on
that of the ERC layers custom layout.
used `:pre-config` instead `:post-init`, otherwise `slime-company` won't be
initialized because `common-lisp/init-slime-company` is called after
`common-lisp/init-slime`, and `:post-init` probably won't make effect.
Fixes#8796
Added a Spacemacs style keybinding for the function cider-eval-defun-to-comment
This function evaluates and expression and displays the result as a comment
on the following line.
The CIDER keybinding is `C-C M-;` so the Spacemacs binding uses the `;`
convention, which is also the general character for comments in Emacs.
As this is an evaluation function, the keybinding is placed under the evaluation
part of the major mode menu.
Included documentation in the README.org file
Pasting in evil-mode has been broken since
`58458f2d2abcc1211444c2060ab598f55e518da4`, as `p` and `P` would always paste
from the unnamed register instead of the register selected with `"`. I've
removed the function's second parameter, as it wasn't being used anywhere.
Fixes#8759
problem: target window doesn't get focus after buffer swap:
'symbols function definition is void: select-window-by-number'
solution: missing 'winum-' before 'select-window-by-number'
The only readily available keybinding for joining channels in slack is for
joining public channels. This commit adds bindings for joining private
channels, (called groups in emacs-slack) as well as a keybinding for
slack-select-rooms which allows joining a channel, group, or DM.
This commit also rebinds the major mode `k` to slack-select-rooms, which puts it
more in line with how the related keybinding in the slack client works.
Highlight should already be done automatocally.
This highlight is not desirable because it breaks `n` and `N` search of
occurences and it breaks `:nohl:` as well making it impossible to revert an
highlighted word.
These drawbacks were maybe intentional since it was about highlighting
_permanently_ but it goes against principle of least astonishement, users will
be consufed about an highlight that cannot be reverted whatsoever.
We need an highlighting facility in Spacemacs, there was one at some point with
the package `hl-anything` but at the time it was buggy and removed from
Spacemacs (see layer spacemacs-editing-visual). Maybe we could try it again.
According to official elm-format documentation there is elm-format-on-save option. I've added it to layer documentation and introduced "On save usage" section which now contains info about elm format on save and imports sort on save.
| ~SPC m c~ | Clear deft filter |
| ~SPC m N~ | Create new file named |
| ~SPC m o~ | Deft open file in other window |
| ~SPC m r~ | Rename selected note |
The keybinding has changed from `SPC h l` to `SPC r l`; see the changelog, entry
0.200.0 (2016/10/02). So correct the documentation to reflect that.
`SPC h l` is currently bound to `helm-spacemacs-help-layers` (on branch
`develop`).
It is an Emacs-wide convention to use `RET` when referring to the act of
pressing the return key. Spacemacs seems to follow that convention as well. So
fix some Org files that were deviating from this convention.
In particular, replace usages of `<return>` and `return` with `RET`.
Also update the description of an `M-RET` keybinding[1] based on the docstring
of `ido-select-text`.
[1]: Suggested-by: bmag <bmag@users.noreply.github.com>
* Don't list imenu if it isn't loaded
* Add recentf config to :post-init function
* Add :init and :config sections for counsel and ivy for accessibility
* Add projectile alt actions to invalidate cache
* Add recentf alt actions to refresh and delete items
* Load flx since it is listed
- Use compilation-start to get highlighting of compilation or runtime errors.
- Configure output window in popwin and window-purpose (so that it can be closed
with C-g for example).
- Configurable buffer name.
Indentation in the elm layer was confusing to me at first so I thought it would be a good idea to add a note. I stole the section from elm-modes docs: https://github.com/jcollard/elm-mode#indentation
It was `SPC q z` but:
1. 'z' is not a mnemonic for "frame" (although it may be more familiar to vim
users).
2. More importantly, it's *really hard* to type 'qz' on a qwerty keyboard.
Lines containing a carriage return alone, followed by color escape
sequences, are not colorized properly.
A carriage return in the compilation buffer is interpreted by erasing
contents since the beginning of the line, but compilation-filter-start
is not updated accordingly before calling the filter-hooks.
Workaround it by always colorizing a region from to the beginning of the
line where compilation-filter-start points.
Provide a way to toggle space-doc-mode in any org file with a keybinding.
Useful for reading documents in the same mode as Spacemacs documentation is
opened in.
Updated the `spacemacs/new-empty-buffer` function, to accept a `split`
argument, that can have 4 values: `left`, `below`, `above` or `right`.
Added new functions and key bindings (SPC b M-h, -j, -k and -l) for
each direction.
- Base Remapping Keys
`#{n, e, i, o}` <=> `#{h, j, k, l}`
- setting `avy` keys to the `colemak` home row keys
`#{a, r, s, t, n, e, i, o}`
- adjusting leader key to `tn`
- overriding evil org mode bindings especially for 'o'
- one character key guess rebindings can give back empty string
when looking for the prefix and it isn't empty, then guess the rebindings --
this fix lets the check not pass and return `'(nil nil)`, allowing the
`(remove-if #'null)` to actually work.
- correcting magit staging when using visual line
Some of the layers do not supply a README.org file which caused
invalid links in the layer list. To avoid this I have changed
spacemacs//generate-layers-from-path to only add links to layers
with a valid README.org file.
I have also removed an invalid check to exclude the non existing directory
"distribution" from the layers list. I think that originally the folder
"distributions" should have been excluded but this is not longer
a feasible action as there is at least one layer with a valid README.org
file in there today. So now we add links to all layers providing a
README.org file independent of their category.
Limit the lines to only get sorted when a block or rectangle
selection is active, on 2 or more lines. Otherwise show a
message stating the requirements for sorting by column.
Problem: In the Ivy layer, `SPC p` lists: h -> helm-projectile
but when it's called, then it shows:
`command-execute: Wrong type argument: commandp, helm-projectile`
Solution: Remove "ph" 'helm-projectile from: spacemacs-base/package.el
Because it's also defined in the Helm layer.
Add a README.org to the Helm layer to fix `helm-spacemacs-help-layers`
(`SPC h l`). There is little actual documentation -- it just links to
the official docs as well as the Helm wiki and the Helm guide.
Issue #8679
Modify the default behavior for eshell's clear functionality.
- Make eshell `clear RET` _similar_ to `C-l`
- `clear RET` is eshell/clear
- `C-l` is eshell-clear-stroke
- Prevent `C-l` clearing cycle
- Prevent `clear RET` inserting a page of white-space
- Prevent duplicate insert lines from `clear RET`
- Make eshell-clear-keystroke that is dependent on eshell/clear
- Load both after eshell is initialized to prevent them from being overwritten
This fixes#5424, fixes#5419
Modify eshell clear statements load position
Change the clear statements load position from after loading eshell to
after enabling eshell.
This produces the same result, but is cleaner.
Note, they _cannot_ be defined before eshell loads, otherwise they are overwritten.
Refactor eshell-clear-keystroke to spacemacs/eshell-clear-keystroke
- Reduce steps needed to access clear command with define key
- Rename function to match naming conventions
- The function shouldn't be accessed from the shell prompt
- So not eshell/clear-keystroke
- The function isn't from eshell.el
- So not eshell-clear-keystroke
- However, eshell/clear should be since it is overwriting a command
Otherwise, the Haskell layer throws an eager expansion error because
`layers/+lang/haskell/funcs.el`, which calls this macro, is loaded before
`layers/+completion/auto-completion/config.el`, which defines
`spacemacs-default-company-backends`.
Create new layers:
- spacemacs-navigation: contains packages whose principal goal is navigation
- spacemacs-modeline: contains packages about mode line
Merge spacemacs-ui and spacemacs-ui-visual into layer spacemacs-visual.
Some slime commands such as `,load-system` do not work without `slime-asdf`
being loaded. Since ASDF is the main system definition facility used by lisp
programs, I think this functionality should be available by default.
Eshell doesn't call preoutput-filter functions in the context of the eshell
buffer. This breaks the xterm color filtering when the eshell buffer is updated
when it's not currently focused.
I intend on submitting this fix upstream when I get a chance but an advice fixes
it for now. The other fix is to move the xterm color filter to a
output-filter function (instead of preoutput-filter) but those operate on
strings that have already been inserted into the buffer.
The auth-source-search function has an implied :max parameter with value 1. In
the case of connecting to multiple irc servers, only the first line in .authinfo
was applied. Thus, we should pass a value for :max to auth-source-search that is
guaranteed to at least be able to fit all our credentials.
The unimpaired keybindings `[ q` and `] q` can be used to jump to flycheck
errors in the current buffer. Because evil-repeat treated them as regular
operations, they were repeated when pressing the `.` key. This made it harder to
rename multiple erroneous variables.
This change updates the `packages.el` file to support automatically enabling
flycheck when opening a protobuf file. This is accomplished by adding `flycheck`
to the list of packages, as well as defining a `post-init-flycheck()` function.
I've tested that this works with spacemacs `0.200.7@25.1.1`.
SPC m g C is only used in Clojure whereas SPC m g c is used in various layers.
This is simpler to just move create tags to SPC m g C and move the clojure
bindings to SPC m g c (since it is not used in the clojure layer).
Weirdly, the `'` keybind for `neotree-mode-map` was already present when
doing `M-x neotree-quick-look` with the cursor on the neotree window but
I could not find where exactly it was defined.
This commit officially adds it to the `neotree-mode-map` and the neotree
transient state.
1. Make it possible to exclude the package (fix the go and rust layers).
2. Import variables all at once (avoid spawning multiple login shells).
3. Import variables early (during the "pre" package loading stage).
4. Centralize the platform check by using a package toggle in the
`spacemacs-base`.
5. Avoid importing already defined variables (except `PATH`/`MANPATH`).
Relates to #8537.
TODO: We can probably trim the platform list to macos only.
spacemacs/add-flycheck-hook was not really hooking anything, change the name
to better reflect what it does.
Also changed the push for a add-to-list to avoid duplicates.
Define multiple dispatch functions for each service:
- spacemacs//java-setup-backend
- spacemacs//java-setup-auto-completion
- spacemacs//java-setup-syntax-checking
- spacemacs//java-setup-spell-checking
- spacemacs//java-setup-eldoc
java: replace ensime-configure-keybindings function by a variable
It's not convenient to have key bindings in funcs.el file, instead of relying
on a function we define a private layer variable java--ensime-modes which
can be updated by other layers using a :pre-config use-package hook.
java: refactor key bindings
- define key bindings for meghanada back-end
- move ensime key bindings documentation from scala layer to java layer
- change SPC m d for daemon to SPC m D (since SPC m d is reserved for debugging)
New variable `java-backend' controls whether to use eclim, by default,
or ensime.
The setup is identical to scala and as such there's some functionality
included that still isn't supported in java.
- Just setting evil-search-module is not enough. If Evil is loaded already, we
must call evil-select-search-module as well to actually change the
key-bindings to use the correct search module.
- If the user didn't set hybrid-mode-use-evil-search-module so it's not bound,
we treat it as if it was set to nil, to match the documentation and the
default value of hybrid-mode-use-evil-search-module.
Specifying parent modes (e.g. prog-mode) in :enabled-for-modes and
:disabled-for-modes keys in dotspacemacs-line-numbers catches derived
modes (e.g. c-mode) as well.
Fix bug where an empty :disabled-for-modes and a non-empty :enabled-for-modes
enabled line numbers everywhere, instead of only in modes specified in
:enabled-for-modes. (see https://github.com/syl20bnr/spacemacs/issues/8482)
Add auxiliary function spacemacs/derived-mode-p, similar to derived-mode-p but
takes a major-mode as an argument instead of using the current major-mode.
The issues section in the bitbucket evil repository seems to
have been removed when the evil package was migrated to github.
It means that the bitbucket url to the file: evil-states.el,
is eventually going to become outdated and possibly removed.
And the bitbucket issue url now redirects to the bitbucket sign
up page.
Therefore both urls were updated to point to the equivalent
urls in the github evil repository.
rg tries to be smart about printing line numbers in its output (if running
inside a TTY or not). On Windows, sometimes (always?) it chooses not to print
line number. However, we always want line numbers, so we need to pass -n flag.
Also fix a minor grammar mistake.
Add spacemacs/enable-transparency and spacemacs/disable-transparency.
For anyone who'd like to enable transparency at startup, just write '(spacemacs/enable-transparency)' to .spacemacs, and it'll work fine.
Fix spacemacs/increase-transparency and spacemacs/decrease-transparency
- delete some diminish expressions which are not related to PG and user
spacemacs|hide-lighter instead of spacemacs|diminish
- move company related configuration to the correct place
- move setq expressions to :init blocks to allow users to easily change them
As it make evil to error when the delq form is written the customize file,
instead we call the set method manually and it works fine.
Would be better and more future proof to curry the set function into a named
function of 0 arity for evil-intercept-maps custom setting.
README:
- add `SPC m` prefixes to follow the style of the other READMEs
- Sort key bindings alphabetically
Key bindings changes made to be more mnemocnic and/or to better fit the other
key bindings of other layers:
- SPC m p b --> SPC m p p (show prover process buffer)
- SPC m p c --> SPC m p i (interrupt prover process)
- SPC m p x --> SPC m p q (quit prover process, maybe SPC m p k for kill would
be better ?)
- SPC m a p --> SPC m a a to print query
- SPC m a n p --> SPC m a A to print query showing all
- SPC m a i p --> SPC m a i i to print query showing implicits
- Ask showing all bindings use the same keys as regular Ask but the last key
is capitalized, example: SPC m a b (ask about) and SPC m a B (ask about
showing all)
- Ask showing implicits are still on SPC m a i (we could also use Control key,
for instance SPC m a b (ask about) and SPC m a C-b (ask about show implicit),
it depends on how frequent showing implicits are used).
- SPC m g . --> SPC m g l (go to end of Locked command)
- SPC m g d --> SPC m g g (using the jump handlers facility of Spacemacs)
- SPC m g a --> SPC m g s (to go to start of command)