micro editor settings
mouse 602 · person cloud · link
Last update
2024-03-26
2024
03-26
« — »

install fileamanger plugin

1
2
3
4
5
6
7
8
# install official plugin (open in new split window via Tab key)
micro -plugin install filemanager

# or install custom version (open in new tab via Enter key)
mkdir -p ~/.config/micro/plug/filemanager/
cd ~/.config/micro/plug/filemanager/
wget https://github.com/acavalin/updated-plugins/raw/master/filemanager-plugin/filemanager.lua
wget https://github.com/acavalin/updated-plugins/raw/master/filemanager-plugin/syntax.yaml

~/.config/micro/settings.json

1
2
3
4
5
6
7
8
9
10
{
  "colorcolumn": 80,
  "colorscheme": "railscast",
  "filemanager.openontab": true,
  "filemanager.showdotfiles": false,
  "filemanager.showignored": false,
  "mouse": false,
  "tabsize": 2,
  "tabstospaces": true
}

NB: add "clipboard": "internal" when external is unavailable

~/.config/micro/bindings.json

1
2
3
4
5
6
7
8
9
10
11
{
  "Alt-/": "lua:comment.comment",
  "Alt-h": "command:setlocal filetype shell",
  "Ctrl-d": "lua:comment.comment",
  "Ctrl-o": "lua:filemanager.toggle_tree",
  "Ctrl-w": "Quit",
  "Alt-w": "NextSplit",
  "Ctrl-q": "QuitAll",
  "Alt-Ctrl-f": "command-edit:replace s d",
  "CtrlUnderscore": "lua:comment.comment"
}

resizing window splits

See this comment, resize plugin and key bindings:

1
2
3
4
5
6
{
  "Alt-A": "command:shrink_X",
  "Alt-D": "command:grow_X",
  "Alt-S": "command:grow_Y",
  "Alt-W": "command:shrink_Y"
}

See also: gh, discord, keybindings official & gist