Initial poop
This commit is contained in:
commit
f08eb93486
3280 changed files with 3759 additions and 0 deletions
21
docs/programming/custom-default-editor.md
Normal file
21
docs/programming/custom-default-editor.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Custom default editor
|
||||
If you'd like to for example open #emacs with `-nw` you need to do some trickery.
|
||||
|
||||
Create a script to open the editor and set it executable
|
||||
``` sh title="/usr/local/bin/emacs-nw"
|
||||
#!/bin/sh
|
||||
emacs -nw "$@"
|
||||
```
|
||||
|
||||
Add the script to list of known editors (if using update-alternatives system) and set it default:
|
||||
``` console
|
||||
$ sudo update-alternatives --install /usr/bin/editor editor /usr/local/bin/emacs-nw 2;
|
||||
$ sudo update-alternatives --config editor;
|
||||
```
|
||||
|
||||
You may also set variables in `~/.bashrc` like so:
|
||||
``` sh title="~/.bashrc"
|
||||
export VISUAL="emacs"
|
||||
export EDITOR="emacs -nw"
|
||||
```
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue