Commit Graph

224 Commits

Author SHA1 Message Date
duianto de2297b2e1 Fix copied dir not in minibuffer, clipboard disabled
Fixed the minibuffer showing: `nil`
when `select-enable-clipboard` is `nil` and the current files
path/dir/file/line/column/etc. is copied with the keys under
the prefix: `SPC f y`
2019-06-17 09:20:01 +02:00
Juha Jeronen 672e3db625 Customizable major-mode for new empty buffers
New var: dotspacemacs-new-empty-buffer-major-mode

Set to a symbol naming a mode (e.g. 'text-mode) to apply that major mode to any
buffers newly created in Spacemacs by spacemacs/new-empty-buffer.

Fixes #12382.
2019-06-17 08:26:56 +02:00
Alexander Miller 2e14b4a88c Don't use large file check in buffers already in fundamental-mode.
This change will prevent unnecessary requests to literally open files that are
literal already (like elfeed's index file).
2019-06-13 15:05:34 +02:00
Anton Alekseev b5027f8f2a Add key bindings for indirect buffer functions 2019-06-08 20:36:34 +02:00
duianto 3868a5364f [doc] Fix typos and add missing/remove extra ~
Add missing ~ (tilde) around key bindings.
Remove an extra ~.
2019-06-01 20:40:22 +02:00
emacspace 2aa62bb5ed documentation formatting: Tue May 28 14:41:10 UTC 2019 2019-05-28 17:43:54 +03:00
JAremko ce4e6e355f tag docs 2019-05-28 17:35:49 +03:00
bb2020 e1cde25da6 Add bindings for `goto-last-change` and `check-parens` 2019-05-24 18:42:55 +02:00
JAremko 8f7b979808 add devdocs tool 2019-05-20 13:10:10 +03:00
Ag Ibragimov fd76a7f300 Add j and k to transient states
It is nicer when user can stay in the "home row" for basic operations like
zooming in and out

Font Scaling Transient State
`k` scale up
`j` scale down

Frame Transparency Transient State
`k` increase transparency
`j` decrease transparency

Zoom Frame Transient State
`k` zoom frame in
`j` zoom frame out

Added two additional Zoom Frame TS keys:
`m` max frame
`f` fullscreen
2019-05-19 22:24:11 +02:00
Anton-Latukha f6660f82d4
Switch to the new layers generator 2019-05-15 21:08:21 +03:00
bb2020 dd67908f75 Remap `M-SPC` and `SPC-x-d-SPC` to `cycle-spacing` 2019-05-08 19:00:14 +02:00
Compro-Prasad 989da8bb8f Fix void function error when recentf-save-list is undefined
This happens because there is an idle timer which runs `recentf-save-list` every
600 secs.
2019-05-06 00:54:01 +02:00
JAremko 77c680160e Add placeholder tags 2019-05-05 20:40:47 +03:00
Bet4 d4b180a735 Various improvements when indent code 2019-04-28 01:19:14 +02:00
Bet4 44cd57d2e2 Remove the use of 'spacemacs|advise-commands' 2019-04-25 19:30:29 +02:00
Bet4 554ca097f2 Check for universal arg before paste
This commit fixes #4219 and fixes #8897
2019-04-25 19:30:29 +02:00
yuhan0 a3469c04ea Add window maximization bindings to transient state 2019-04-11 10:50:41 +02:00
yuhan0 13fd53d65d Make window manipulation transient hint collapsible
Window sizing and layouts can be affected by a large transient state hint,
so having a option for minified hint is especially useful here.

Also reformats the full hint to place `golden ratio` under the "Resize" heading,
reducing overall height by one row.
2019-04-11 10:50:41 +02:00
yuhan0 f961d622cf Add 'SPC w' leader bindings for window resizing
For convenience they directly enter the window manipulation transient state,
since resizing operations tend to involve repeated key presses.
2019-04-11 10:50:40 +02:00
duianto 3819cf4dbd Add SPC o which-key prefix name: user bindings 2019-04-06 16:00:34 +02:00
duianto 3de7081950 Cleanup which-key names
Moved:
- ("ai" "irc") to both the `erc` and `rcirc` layers. They don't have to be
  renamed until the layers are loaded.

- ("ay" "ipython notebook") to the `ipython-notebook` layer.

- ("p$" "projects/shell")
  ("'"  "open shell")
  ("as" "shells")
  to the `shell` layer.

- The commands with keybindings from spacemacs-bootstrap/packages.el to
  spacemacs-defaults/keybindings.el.

Removed:
- ("gd" "diff") it seems to be an old group name, there's no `SPC g d` group at
  the moment.

- ("Re" "elisp") and ("Rp" "pcre") because they have moved to:
  ("xr" "regular expressions")
  ("xre" "elisp")
  ("xrp" "pcre")

- ("xm" "move") seems to be an old move text group, the current keybindings are
  `SPC x J` and `SPC x K` which opens the Move Text Transient State.

- ("b" "persp-buffers") because `SPC b` is also renamed as ("b" "buffers") which
  is more general and not persp-mode specific.
2019-02-18 14:35:00 -05:00
syl20bnr 95422ae5d5 Second part of review and tweaks of release notes 2019-02-10 12:37:41 -05:00
syl20bnr 474f945709 defaults: add SPC T N key binding to cycle theme backward 2019-02-10 10:10:51 -05:00
JAremko 24d875e193 Add transient state for centered buffer 2019-01-27 20:49:40 +02:00
yuhan0 6737c8c8e5 Add ivy option to buffer transient state 2019-01-21 23:06:08 +02:00
JAremko 69a89cc412 Replace centered-buffer-mode with writeroom-mode 2018-11-26 11:14:04 -05:00
duianto 438ad905da Update delete file messages
problems:
the delete file prompt doesn't show which file it's about to delete,
and when the deletion request is canceled, then the question remains in the
minibuffer (the text disappears when an action updates the minibuffer, like
moving the cursor, but it might be confusing to still be seeing the question
after it's been answered)

solution:
show the file name in the delete file prompt, and show a canceled message
2018-11-12 22:07:25 +00:00
Ag Ibragimov 27b2fb424a Keeps previous position on toggle-maximize-buffer 2018-11-12 22:01:56 +00:00
yuhan0 0596e90c3d Add 'z' recenter bindings for various transient states
By analogy with the "zz", "zb", "zt" vim / evil bindings, this adds an
additional key binding "z" for `recenter-top-bottom` to the following
transient states which navigate around the buffer in large jumps:
- auto-symbol-highlight
- error
- buffer
- vcs
- org-babel

This allows for repositioning of the buffer for visibility without having to
exit the transient state.

Minor updates are also made to documentation of other transient states.
2018-11-12 21:47:17 +00:00
Boris Buliga 69a1e056ff
support directories in spacemacs/rename-file
1. Fix `short-name` for directories. Previously it was empty string.
2. Remove redundant check for existing buffer:
   1. `(get-buffer new-name)` always return `nil`, because `new-name` is a path
      to file, not a file name.
   2. `(find-file new-name)` handles this situation.
   3. `dired-rename-file` handles this situation as well.
3. Use `dired-rename-file` to do the dirty stuff.
   1. Renames files and directories.
   2. All associated buffers are updated. If you rename a directory, all buffers
      that were visiting files from that directory now visit files from new
      directory.
4. Properly handle recentf list update for directories - all files from the
   renamed directory are removed from recentf list and the same files but from
   new directory are added back.
2018-10-31 20:56:28 +02:00
Boris Buliga 5d4b80bbad
set load-prefer-newer to t 2018-10-23 07:11:47 +03:00
duianto 0f1c461a5c
Fix missing newline warning
problem:
`'face 'minibuffer-prompt` and `new-name` are shown with an orange color,
and `describe-char` shows that they have the face: `font-lock-warning-face`

solution:
adding a newline before them removes the orange warning color
2018-10-18 19:34:15 +03:00
JAremko cd39f80c24 Reformat documentation 2018-10-11 00:13:43 +03:00
syl20bnr 9f8b867af1 Add SPC f y n and SPC f y N to copy the name of a file 2018-09-11 15:04:19 -04:00
Miciah Masters 7852c3b36e Delete compilation finish hook
Before this commit, Spacemacs assigned an anonymous function to the
compilation-finish-function variable.  This variable was deprecated
in Emacs 22.1 and removed in Emacs 27.1 in favor of the
compilation-finish-functions hook.  Consequently, the assignment has
no practical effect in Emacs 27.1.

Although we could add the Spacemacs function to the new
compilation-finish-functions hook, the function serves little purpose; it
prints a generic message when compilation succeeds:

    compilation ok.

and it prints the key binding for spacemacs/next-error when compilation
fails:

    There were errors. Use SPC e n to visit.

However Emacs already prints messages to indicate success or failure,
respectively:

    Compilation finished

or (for example)

    Compilation exited abnormally with code 1

Because the Spacemacs function prints its "There were errors" message
immediately after Emacs prints its "Compilation exited abnormally" message,
the latter was obscured.  Because the exit code in Emacs's message could be
useful and the added value of the Spacemacs function's message is minimal,
we can simply delete the Spacemacs function.

* layers/+spacemacs/spacemacs-defaults/funcs.el
(compilation-finish-function): Delete the assignment and anonymous
function.
2018-09-03 21:29:53 +01:00
Codruț Constantin Gușoi 816099aa2b Fixes keybinding conflict with `fasd` layer
The `SPC f a` keybinding was already used by the `fasd` layer so a
workaround had to be found for the newly introduced one.

Refs: c2e377c902
Refs: #11224

Thanks @agzam for pointing it out and investigating potential solutions.
2018-08-30 00:13:43 +03:00
Masayuki Takemura c2e377c902 spacemacs-defaults: add a keybind to open a file and replace buffer with it
Define an alias and use it internally so that (1) the name of the command will
be better to understand what it does than the original name and (2) Helm or Ivy
interface is invoked instead of Ido.

These are suggested in PR #11115.
2018-08-21 00:55:37 +03:00
Miciah Masters 1ecffa9834 Bind SPC f i to spacemacs/insert-file 2018-08-01 22:46:40 -04:00
Miciah Masters 07964b1a2e Work around ido-mode remapping Spacemacs keys
Add aliases for commands that ido-mode remaps that we want to bind to
Spacemacs keys, and use these aliases in the Spacemacs key bindings so that
these bindings invoke the original commands rather than the ido commands.

See <https://github.com/syl20bnr/spacemacs/issues/10237#issuecomment-359861570>.
2018-08-01 22:46:40 -04:00
syl20bnr 1ae5463051 Correctly lazy-load and disable zone 2018-07-29 15:42:32 -04:00
Kechao CAI 115c93050f +spacemacs: fix zone init
Commit 6f15744 causes the zone initialization error. This will fix #11101.
2018-07-29 15:32:31 -04:00
syl20bnr 6f157449c1 Fix zone-out-when-idle and correctly disable it when nil 2018-07-28 18:32:23 -04:00
Jesse Byler 1671f53f93 Add function spacemacs/new-empty-buffer-new-frame with binding
Add new function spacemacs/new-empty-buffer-new-frame, implemented
with a new selector in spacemacs/new-empty-buffer.  Bind it to
<SPC> b N f
2018-07-23 23:52:31 +03:00
Codruț Constantin Gușoi e2c0250548 Clarifies the zero based column indexing with messages and docs 2018-07-12 09:13:02 +03:00
Miciah 899e6beaac Fix and rename column-indexing toggle
The column-indexing toggle did not have a :status property.  As a result,
the toggle command would enable the toggle but would not disable it.  In
addition, the absence of :status prevented -off and -on commands from being
defined.

This commit adds a :status property so that the toggle works properly and
-off and -on commands are defined.

This commit also renames the toggle to "zero-based-column-indexing" in order to
make its purpose clearer.

* layers/+spacemacs/spacemacs-defaults/keybindings.el (column-indexing):
Add :status and rename to "zero-based-column-indexing".
2018-07-10 18:17:57 -04:00
syl20bnr a013d86874 core: update environment variables management
* add new dotfile function `dotspacemacs/user-env`
* add ignored env. vars with variable spacemacs-ignored-environment-variables
* ignore env vars: SSH_AUTH_SOCK and DBUS_SESSION_BUS_ADDRESS
* update documentation in DOCUMENTATION.org
* update .spacemacs.template with new function
* rename environment file from spacemacs.env to .spacemacs.env
* move location of .spacemacs.env file to home or dotdirectory
* add a header to the generated .spacemacs.env file to explain what it is
* make SPC f e e fallbacks to the function dotspacemacs/user-env if the user
  manages the env var by themselves
* make SPC f e E call the new function dotspacemacs/user-env
* sort environment variables in .spacemacs.env file
2018-07-03 01:25:28 -04:00
Codruț Constantin Gușoi aba51afe48 Multiple ways to copy a file path 2018-06-29 01:09:54 +03:00
bmag b54ea8ef90 line-nums: don't default to text/prog-mode if disabled by user
When :enabled-for-modes is nil we default it to '(prog-mode text-mode), but if
any of them is in :disabled-for-modes then it shouldn't be enabled by default.
This commit fixes the second part.
2018-06-27 09:13:21 +03:00
syl20bnr 6220ace290 core: rework environment variables and PATH management
See updated DOCUMENTATION.org and FAQ.org for more info.

* add core-env.el
* add library load-env-vars.el
* add bootstrap package dotenv-mode.el
* remove spacemacs-environment from bootstrap layer
* remove dotspacemacs variable dotspacemacs-import-env-vars-from-shell
* remove dotspacemacs variable dotspacemacs-improt-env-vars-shell-file-name
* add new key binding SPC f e e to open spacemacs.env file
* add new key binding SPC f e E to reload environment variable from env file
* add new key binding SPC f e C-e to re-initialize the env file from shell.
2018-06-25 02:55:28 -04:00
syl20bnr ad3ee59158 Smart lazy load of line numbers 2018-06-14 21:23:02 -04:00
syl20bnr 36c5cb0725 Lazy load zone 2018-06-14 21:10:01 -04:00
Jason Axelson d01658ec61 Additional documentation for spacemacs/toggle-current-window-dedication 2018-06-14 20:12:16 -04:00
syl20bnr 55d18a1a3a Move SPC s c to bootsrap layer 2018-06-14 00:21:56 -04:00
Daniel Molina 55e0506ef0 Fix typos 2018-06-14 00:15:49 -04:00
Benjamin Reynolds 594fdc8f05 Rename spacemacs/mplist-get functions to be more descriptive
* spacemacs/mplist-get -> spacemacs/mplist-get-values
* spacemacs/plist-get -> spacemacs/mplist-get-value
* refactor spacemacs/mplist-get-value to be defined in terms of mplist-get-values

Ref #10803 See [comment]

[comment]: https://github.com/syl20bnr/spacemacs/pull/10803#issuecomment-395292606
2018-06-14 00:15:49 -04:00
Codruț Constantin Gușoi 8ad78ca7d3 Brings back search highlight clear 2018-06-12 22:43:22 +03:00
Guido Kraemer 0fcdec5fa4 keybinding-alphabetic order 2018-06-02 18:34:30 +03:00
Guido Kraemer 76c4ec0358 add transpose sexps keybinding 2018-06-02 18:34:30 +03:00
Codruț Constantin Gușoi 0ebcc25369 Removes line numbers width setting
As discussed here: https://github.com/syl20bnr/spacemacs/issues/9362#issuecomment-393328914
2018-06-02 16:45:28 +03:00
Codruț Constantin Gușoi 390462e36d Adds some profiling keybinding under `SPC h P` 2018-05-31 01:23:02 +03:00
Codruț Constantin Gușoi 83f2fd4d22 Window splitting with custom delete
Implements some custom window layout splitting functions.
2018-05-31 01:16:57 +03:00
bmag 3812c591cf Line numbers: tests and bug fixes for major-mode predicate 2018-05-30 11:35:26 +03:00
bmag 8f82486154 Add support for native line numbers in Emacs 26
Emacs 26.1 will introduce a new native line numbers feature:
"display-line-numbers". It includes relative line numbers, is faster than
current linum-mode, and doesn't use the margin area (it has its own area). So
yeah, we want to use the new feature when possible.

No changes are required on the user side, except for Emacs 26 users are
recommended to remove nlinum layer from their configuration (if they have
enabled it).

With this change:
- Emacs 26:
  - uses display-line-numbers by default.
  - linum and linum-relative packages are excluded.
- Emacs 25:
  - does NOT use display-line-numbers.
  - continues to use linum and linum-relative.
- nlinum layer:
  - can still be used as before in Emacs 25.
  - is NOT recommended in Emacs 26, but can be used.
  - when enabled, excludes display-line-numbers.

Also contains some bug fixes:

Fixes a bug where setting `dostpacemacs-line-numbers` to `t` or `relative`
enabled line numbers in every buffer, instead of only in buffers that derive
from prog-mode and text-mode.

Likewise fixes a bug where specifying `:enabled-for-modes nil` (or not
specifying `:enabled-for-modes` at all) in `dotspacemacs-line-numbers` settings
meant "enable in all modes" instead of "enable in modes derived from prog-mode
or text-mode".

Because of this change, also adds a way for users to enable line numbers
in *all* buffers.

Removes check for special buffer. All our current checks should be enough to
enable line numbers only where it makes sense. Disabling in all special buffers
is not necessary.
2018-05-28 19:29:15 +03:00
Bet4 7fb966d3db recentf: use recentf-expand-file-name to generate recentf-exclude 2018-05-27 23:38:38 +03:00
Miciah Dashiel Butler Masters 78297be625 Fix various typos
* Fix various isolated typos

"apppend" -> "append"

"availabe" -> "available"

"Descripti using ternon" -> "Description"

"you have not them" -> "you don't have them"

"new on" -> "new one"

"plained" -> "curved"

"repel" -> "REPL"

"vairable" -> "variable"

* Fix a few errors in the CoffeeScript layer readme

Add a missing "the".

Correct a reference to the layer as "javascript" to "coffeescript".

Fix the syntax on the link to CoffeeLint.

* Fix typos: "dofile" -> "dotfile"

* Fix typos: "formated" and "formating"

"formated" -> "formatted"

"formating" -> "formatting"

* hy: Fix docstrings in funcs.el

Fix copy-and-pasted docstring text for
spacemacs/hy-shell-eval-current-form-and-go and
spacemacs/hy-shell-eval-region-and-go.

* Fix typos: "indendation" -> "indentation"

* Fix typos: "the the", "a a"

Fix duplicated (or misplaced) articles.

* Fix typos: "wether" -> "whether"

* Fix typos: "intialize" -> "initialize"
2018-05-23 22:12:30 -04:00
Jesse Byler 65e605f81b Fix vert/horiz in Window Manipulation Transient St (#10726)
Swaps usage of veritcal and horizontal in the documentation string
for Window Manipulation Transient State.

Fix for Issue #10725.
2018-05-22 23:34:11 -04:00
syl20bnr 87dc5f100c dump: add support for winner
pdump cannot dump window configurations so we make sure to activate winner
outside of the dump phase
2018-05-20 03:58:48 -04:00
syl20bnr ed9123984a dump: require recentf and eldoc when dumping 2018-05-20 03:58:48 -04:00
Codruț Constantin Gușoi d4c8513075 Split windows as @bmag suggested.
Refs: https://github.com/syl20bnr/spacemacs/pull/10669#issuecomment-388815579
2018-05-14 22:48:09 +03:00
Alex cbf6de8ef1 Add 2x2 grid layout shortcut 2018-05-14 22:39:56 +03:00
Alex 5ea833f10b Add function and keybinding for single column window layer.
We have key bindings to create two and three column
window layers.

This commit makes available a key binding to return to
the default spacemacs window layer, the single column one.
2018-05-10 22:38:47 +03:00
JAremko d4017b1ca7 Make sure that docs pass formatting cheques. 2018-04-15 22:16:17 +03:00
syl20bnr 0fa3658cd8 reorganize spacemacs-base distribution into +spacemacs/spacemacs-xxx
This idea is to have the spacemacs-base distribution only configure defaults for
built-in packages. Those buit-in packages are now configured in the new layer
spacemacs-defaults.
Additionally some other packages of spacemacs-base have been dispatched to
better suiting spacemacs layers.

Projectile has been moved to the new layer spacemacs-project

- Move the following packages to bootsrap distributio layer:
  - exec-path-from-shell
  - evil-evilified-state
  - holy-mode
  - hybrid-mode
  - spacemacs-theme
- ace-window has been moved to spacemacs-navigation
- centered-buffer-mode has been moved to spacemacs-editing-visual
- pcre2el has been moved to spacemacs-editing
- evil-escape and evil-visualstar have been moved to spacemacs-evil
2018-03-04 20:54:54 -05:00