Share configs #1360
Replies: 36 comments 39 replies
|
Some things I have to share: I personally flip selections much more than I collapse them, so I have [keys.normal]
";" = "flip_selections"
"A-;" = "collapse_selection"As I mentioned in #1335 (comment), I bind [keys.select]
"g" = { "e" = "goto_file_end" }I use [keys.normal]
"K" = "hover"
"A-k" = "keep_selections" |
|
This is my config so far: theme = "bogster"
[lsp]
display-messages = true
[editor]
true-color = true
[keys.normal]
# For Kakoune like config
S-left = "extend_char_left"
S-right = "extend_char_right"
S-up = "extend_line_up"
S-down = "extend_line_down"
"#" = "toggle_comments"
C-c = "no_op"
q = { q = "wclose" }
"space" = { "space" = "keep_primary_selection", "q" = ":buffer-close" }
"esc" = [ "normal_mode", ":format" , ":write" ] # For quick saving
A-o = "add_newline_below"
A-O = [ "open_above", "normal_mode" ] # Doesn't work.
# Windows-like movement
C-left = [ "move_prev_word_start", "move_char_left", "move_char_right" ]
C-right = [ "move_next_word_start", "move_char_left", "move_char_right" ]
"ret" = ":write"
"C-q" = ":quit!"
[keys.insert]
C-backspace = "delete_word_backward"
# Windows-like movement (again)
C-left = [ "move_prev_word_start", "move_char_left", "move_char_right" ]
C-right = [ "move_next_word_start", "move_char_left", "move_char_right" ]C-backspace doesn't actually work(due to some crossterm issue. |
|
I found switching [keys.normal]
x = "extend_to_line_bounds"
X = "extend_line"
[keys.select]
x = "extend_to_line_bounds"
X = "extend_line"edit: Also, setting different cursors for different modes helped me a lot: [editor.cursor-shape]
normal = "block"
insert = "bar"
select = "underline" |
|
Why |
|
Mine so far (20230609): theme = "autumn"
[editor]
auto-save = true
soft-wrap.enable = true
middle-click-paste = false
rulers = [80, 100]
[editor.lsp]
display-messages = true
display-inlay-hints = true
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.statusline]
left = ["mode", "spinner"]
center = ["file-name"]
right = ["diagnostics", "version-control", "selections", "position", "file-encoding", "file-line-ending", "file-type"]
[keys.insert]
j = { k = "normal_mode" } # Maps `jk` to exit insert mode.
C-h = "delete_char_backward" # Most terminals do this by default.
C-l = "move_char_right" # Useful to jump over closing parenthesises.
[keys.normal]
Z = { Z = ":wq" } # Shortcut to save and close buffer.
C-s = ["save_selection", ":w"] # Add `:w` to the default binding. |
|
I’m looking to add some maps for my Ubuntu config and I’m not sure if I’m doing something silly in my config, but I’m getting the following error when implementing the following config:
Everything here looks right to me(might be a bit messy), so not sure what I’m messing up on. The intent was to get the arrow keys working and I was reading this issue as a reference |
|
So far, this: theme = "base16_term_mod"
[editor]
line-number = "relative"
cursor-shape = { insert = "bar" }
whitespace.render = "all"
whitespace.characters = { space = " ", tab = "▏", newline = "¬" }
# Keymap for the Colemak layout and Kakoune habits (who needs a select mode)
[keys.normal]
j = "move_line_up"
k = "move_line_down"
H = "extend_char_left"
J = "extend_line_up"
K = "extend_line_down"
L = "extend_char_right"
D = "remove_primary_selection" # like in kakoune, non-obvious name for 'opposite of C'
W = "extend_next_word_start"
B = "extend_prev_word_start"
T = "extend_till_char"
F = "extend_next_char"
"A-t" = "till_prev_char"
"A-f" = "find_prev_char"
"A-T" = "extend_till_prev_char"
"A-F" = "extend_prev_char"
"C-j" = "join_selections" # instead of J
"#" = "toggle_comments"
"$" = "extend_to_line_end"
"^" = "extend_to_line_start"
"{" = "goto_prev_paragraph"
"}" = "goto_next_paragraph"
"left" = "goto_previous_buffer"
"right" = "goto_next_buffer"
"space" = { "q" = ":bc" }
[keys.select]
j = "extend_line_up"
k = "extend_line_down"
"0" = "extend_to_line_start"
"^" = "extend_to_first_nonwhitespace"
"$" = "extend_to_line_end"
"{" = ["extend_to_line_bounds", "goto_prev_paragraph"]
"}" = ["extend_to_line_bounds", "goto_next_paragraph"]fyi: current link |
|
I like to keep what I'm used to, so: |
|
My config for the recent 22.08 release: theme = "autumn"
[editor]
idle-timeout = 30 # milliseconds
line-number = "relative"
scrolloff = 999 # center cursor
color-modes = true
auto-format = false
auto-pairs = false
rulers = [80]
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.whitespace]
[editor.whitespace.render]
nbsp = "all"
tab = "all"
[editor.whitespace.characters]
nbsp = "⍽"
tab = "▏"
[editor.statusline]
left = ["mode", "spinner", "diagnostics"]
center = ["file-name"]
right = ["selections", "position", "file-encoding", "file-type"]
[keys.normal.space]
# Copy entire buffer into clipboard:
"space" = ["save_selection", "select_all", "yank_main_selection_to_clipboard", "jump_backward"]
[keys.normal]
# For Kakoune users:
H = "extend_char_left"
J = "extend_line_down"
K = "extend_line_up"
L = "extend_char_right"
W = "extend_next_word_start"
B = "extend_prev_word_start"
E = "extend_next_word_end"
A-j = "join_selections"
A-k = "keep_selections"
M = ["select_mode", "match_brackets", "normal_mode" ]
"#" = "toggle_comments"
A-h = "extend_to_line_start"
A-l = "extend_to_line_end" |
theme = "nord"
[editor]
color-modes = false
cursorline = true
line-number = "relative"
mouse = true
middle-click-paste = true
bufferline = "multiple"
auto-completion = true
auto-format = true
auto-save = false
shell = [
"pwsh.exe",
"-NoLogo",
"-NoProfile",
"-NoProfileLoadTime",
"-Command",
"$PSStyle.OutputRendering='PlainText';",
]
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "block"
[editor.indent-guides]
render = true
character = "|"
skip-levels = 1
[editor.statusline]
left = ["mode", "spinner", "diagnostics"]
center = ["file-name"]
right = [
"selections",
"position",
"file-encoding",
"file-line-ending",
"file-type",
]
separator = "│"
[editor.terminal]
command = "wtp"
args = ["new-tab", "--title", "DEBUG", "pwsh", "-NoLogo", "-C"]
[editor.lsp]
display-messages = false
auto-signature-help = true
display-signature-help-docs = true
display-inlay-hints = true
# ----------------------------------------- Keymaps
[keys.normal]
C-s = ":w"
C-C = ":clipboard-yank"
H = "goto_line_start"
L = "goto_line_end"
J = "goto_next_paragraph"
K = "goto_prev_paragraph"
C-l = ":fmt"
ret = "increment"
backspace = "decrement"
tab = ":buffer-next"
S-tab = ":buffer-previous"
C-x = ":buffer-close"
A-k = [
"extend_to_line_bounds",
"delete_selection",
"move_line_up",
"paste_before",
]
A-j = ["extend_to_line_bounds", "delete_selection", "paste_after"]
[keys.insert]
j = { k = "normal_mode" }
"C-[" = "normal_mode"
[keys.select]
H = "goto_line_start"
L = "goto_line_end"
J = "goto_next_paragraph"
K = "goto_prev_paragraph"
i = { i = "normal_mode" }
u = "switch_to_lowercase"
U = "switch_to_uppercase"
C-C = ":clipboard-yank" |
|
Till now I don't know how to configure powershell lsp ;-( |
theme = "night_owl"
[editor]
line-number = "relative"
mouse = true
middle-click-paste = true
true-color = true
bufferline = "multiple"
rulers = [120]
text-width = 120
[editor.lsp]
display-messages = true
display-inlay-hints = true
[editor.file-picker]
hidden = false
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.statusline]
left = ["mode", "spinner", "file-name"]
center = ["position"]
right = ["selections", "file-encoding", "version-control"]
separator = "|"
mode.normal = "N"
mode.insert = "I"
mode.select = "S"
[keys.normal]
left = "move_char_left"
right = "move_char_right"
up= "move_line_up"
down = "move_line_down"
H = ["select_mode", "goto_line_start", "normal_mode"]
L = ["select_mode", "goto_line_end", "normal_mode"]
K = "extend_next_word"
[keys.select]
left = "move_char_left"
right = "move_char_right"
up= "move_line_up"
down = "move_line_down"
|
|
Here is the part I'm more proud of: [keys.select]
# just to homogenize with the command below, see comments below
"A-;" = "collapse_selection"
";" = "flip_selections"
[keys.normal]
C-s = ":update" # C-s for saving
x = ["extend_line", "select_mode"] # prefer selection with movement: hjkl
X = ["extend_line", "select_mode", "flip_selections"] # same as the above but prepare for going up
# the cursor should show where you are going to as in any text editor, let's change a and i
i = ["collapse_selection", "insert_mode"]
a = ["collapse_selection", "append_mode"]
# same thing for D and R
D = ["collapse_selection", "delete_selection"]
R = ["collapse_selection", "replace"]
C-r = ["replace_with_yanked"] # this is mapped to R by default...
# with these changes, collapse selection is not needed so much, let's swap it with flip_selection
"A-;" = "collapse_selection"
";" = "flip_selections"
# let's selections easily
A-j = ["extend_to_line_bounds", "delete_selection", "paste_after"]
A-k = [
"extend_to_line_bounds",
"delete_selection",
"move_line_up",
"paste_before",
]
### External commands ###
# I need a snippet, but they are still not available AFAIK
# so let's input it via shortcut
A-i = [
"open_above",
":insert-output echo '__import__(\"ipdb\").set_trace()'",
"normal_mode",
":w",
]
# ChatGPT
A-g = ":pipe sgpt --code --temperature 0.3 --no-cache 'Using this code, apply changes as indicated in the comments starting with \"GPT:\"'"
# ChatGPT inline (copilot-like)
C-n = [
":insert-output echo '# FILL'",
"join_selections",
"extend_line_above",
"extend_line_above",
"extend_line_above",
"extend_line_above",
"extend_line_above",
"extend_line_above",
"extend_line_above",
"extend_line_above",
"extend_line_below",
"extend_line_below",
"extend_line_below",
"extend_line_below",
"extend_line_below",
"extend_line_below",
"extend_line_below",
":pipe sgpt --code --model gpt-3.5-turbo --temperature 0.3 --no-cache 'Using this code, fill the line below the comment \"# FILL\" appears. Return the whole code, including previous and next lines and tabs as in the input.'",
]
# Use neovim for find-replace globally, e.g. using vim-esearch
A-n = ":sh kitty nvim"
H = ["select_mode", "goto_line_start", "normal_mode"]
L = ["select_mode", "goto_line_end", "normal_mode"]
K = "extend_next_word_end"
[keys.normal."space"]
# I like changing colors during the day:
t = { d = ":theme tokyonight_storm", l = ":theme catppuccin_latte", s = ":theme everforest_light", b = ":theme boo_berry" }
# I like searching my .venv directory sometimes:
F = { a = ":toggle file-picker.git-ignore", F = "file_picker_in_current_directory"} |
[editor.cursor-shape]
insert = "block"
normal = "block"
select = "underline"
[editor.statusline]
left = ["mode", "file-name", "spinner"]
center = ["position", "separator", "total-line-numbers", "spacer", "diagnostics"]
right = ["position-percentage", "file-type", "separator", "file-line-ending", "separator", "selections", "file-encoding"]
[keys.insert]
C-h = ["move_prev_word_start", "collapse_selection"]
C-l = ["move_next_word_start", "collapse_selection", "move_char_right"]
[keys.normal]
"$" = "goto_line_end"
"0" = "goto_line_start"
"ret" = ["open_below", "normal_mode"]
"A-/" = ":write"
"A-8" = ":config-reload"
C-k = ["extend_to_line_bounds", "delete_selection", "move_line_up", "paste_before"]
C-j = ["extend_to_line_bounds", "delete_selection", "paste_after"] |
|
cool thread! my config is already heavily screwed, because i am using my own fork of helix. but in general: icons = "nerdfonts"
theme = "tokyonight_storm"
[editor]
bufferline = "always"
color-modes = true
completion-replace = true
cursor-word = true
cursorline = true
gutters = ["diagnostics", "line-numbers", "spacer", "diff"]
idle-timeout = 1
line-number = "relative"
popup-border = "all"
rainbow-brackets = true
rulers = [100]
scrolloff = 5
true-color = true
[editor.indent-guides]
rainbow-option = "normal"
render = true
[editor.lsp]
display-inlay-hints = true
display-messages = true
[editor.file-picker]
git-global = true
git-ignore = true
[editor.soft-wrap]
enable = true
[editor.statusline]
center = []
left = ["mode", "selections", "spinner", "file-name"]
mode-separator = ""
right = ["version-control", "workspace-diagnostics", "diagnostics", "file-encoding", "file-line-ending", "file-type", "position-percentage", "position", "spacer", "total-line-numbers"]
separator = ""
[editor.statusline.mode]
insert = "INSERT"
normal = "NORMAL"
select = "SELECT"
[editor.sticky-context]
enable = true
follow-cursor = true
[editor.whitespace]
render = "all"
[editor.whitespace.characters]
nbsp = "⍽"
newline = "⤶"
space = "·"
tab = "→"
[keys.normal]
C-d = ["half_page_down", "align_view_center"]
C-q = ":bc"
C-u = ["half_page_up", "align_view_center"]
X = "extend_line_above"
[keys.normal."\\"]
t = ":o ~/todo.md"i will most likely create some sort of custom mode for all the keybinds that use Alt to any degree. |
|
constantly updating it, but this is what I got so far: theme = "onedark"
[editor]
true-color = true
line-number = "relative"
cursorline = true
bufferline = "multiple"
mouse = true
middle-click-paste = false
insert-final-newline = true
rulers = [80]
end-of-line-diagnostics = "hint"
inline-diagnostics.cursor-line = "warning"
file-picker.hidden = false
indent-guides.render = true
smart-tab.enable = true
soft-wrap.enable = true
[editor.auto-save]
focus-lost = true
# autosave after 3 seconds
after-delay.enable = true
after-delay.timeout = 3000
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.lsp]
display-progress-messages = true
display-inlay-hints = true
[editor.statusline]
left = [
"mode",
"spinner",
"diagnostics",
"spacer",
"version-control"
]
center = [
"file-name",
"read-only-indicator",
"file-modification-indicator"
]
right = [
"register",
"selections",
"position",
"position-percentage",
"file-encoding",
"file-line-ending",
"file-type"
]
[editor.whitespace.render]
space = "none"
tab = "all"
nbsp = "all"
nnbsp = "all"
newline = "none"
[keys.insert]
# comments
"C-/" = "toggle_comments"
# smart tab
S-tab = "move_parent_node_start"
[keys.select]
# comments
"C-/" = "toggle_comments"
# smart tab
tab = "extend_parent_node_end"
S-tab = "extend_parent_node_start"
# make X extend line above
X = "extend_line_above"
"["."[" = "goto_prev_paragraph" # duplicate bind for [p
"]"."]" = ["goto_next_paragraph"] # duplicate bind for ]p
[keys.normal."["]
"[" = ["extend_to_line_bounds", "goto_prev_paragraph"] # duplicate bind for [p
j = "jump_backward"
s = "save_selection"
[keys.normal."]"]
"]" = ["goto_line_start", "goto_next_paragraph"] # duplicate bind for ]p
j = "jump_forward"
s = "save_selection"
[keys.normal]
# smart tab
tab = "move_parent_node_end"
S-tab = "move_parent_node_start"
# comments
"C-/" = "toggle_comments"
# close file
C-w = ":buffer-close"
# delete the selected line(s). This is from vscode,
# but might be an anti-pattern since `@xd` does the same thing, effectively
S-del = ["ensure_selections_forward", "extend_to_line_bounds", "extend_char_right", "extend_char_left", "delete_selection"]
# make X extend line above (makes more sense then existing binding)
X = "extend_line_above"
# Move lines up/down.
# Ideally these would by A-j/k but those conflict with Zellij's keybinds
C-j = ["ensure_selections_forward", "extend_to_line_bounds", "extend_char_right", "extend_char_left", "delete_selection", "add_newline_below", "move_line_down", "replace_with_yanked"]
C-k = ["ensure_selections_forward", "extend_to_line_bounds", "extend_char_right", "extend_char_left", "delete_selection", "move_line_up", "add_newline_above", "move_line_up", "replace_with_yanked"]
# function row (from vscode)
"F1" = "command_palette"
"F2" = "rename_symbol"
# New minor mode for various misc utilities
[keys.normal."backspace"]
# save
s = [":write"]
S = [":write!"]
# Lazygit
g = ":sh zellij run -ci --name lazygit -- lazygit"
# Open new terminal tab
t = ":sh zellij action new-tab"
[keys.normal.space]
F = "no_op"
C = "no_op"
A-c = "no_op"
# consolidate comment stuff into sub-mode
[keys.normal.space.c]
c = "toggle_comments"
C = "toggle_block_comments"
A-c = "toggle_line_comments"
# Consolidate file picker stuff into sub-mode
[keys.normal.space.f]
f = "file_picker"
F = "file_picker_in_current_directory"
o = "file_picker_in_current_buffer_directory" |
|
Shearing my config :xD # ┓ ┓ •
# ┏┏┓┏┫┏┓┏┫┏┏┓┏┓┓╋
# ┗┗┛┗┻┗ ┗┻┛┣┛┛ ┗┗
# ┛ helix(hx) config
# @codedsprit/hx
theme = "non_background"
[editor]
auto-save = true
auto-format = true
auto-completion = true
bufferline = "multiple"
color-modes = true
completion-replace = true
cursorcolumn = false
cursorline = false
line-number = "relative"
mouse = true
#rulers = [79]
true-color = true
[editor.whitespace.render]
space = "none"
nbsp = "none"
tab = "none"
newline = "none"
[editor.whitespace.characters]
space = "·"
nbsp = "⍽"
tab = "→"
newline = "⏎"
tabpad = "·" # Tabs will look like "→···" (depending on tab width)
[editor.file-picker]
hidden = false
git-ignore = true
git-global = false
[editor.statusline]
left = []
right = [
"file-type"
]
separator = "╎"
mode.normal = "NORMAL"
mode.insert = "INSERT"
mode.select = "SELECT"
[editor.lsp]
display-messages = true
display-inlay-hints = true
[editor.cursor-shape]
insert = "bar"
[editor.indent-guides]
render = true
character = "╎" # Some characters that work well: "▏", "┆", "┊", "╎"
skip-levels = 0
[editor.soft-wrap]
enable = true
max-wrap = 10 # increase value to reduce forced mid-word wrapping
max-indent-retain = 40
[keys.normal]
# esc is remapped to capslock locally
esc = ["collapse_selection", "keep_primary_selection", ":w"]
C-v = "vsplit"
C-h = "jump_view_left"
C-j = "jump_view_down"
C-k = "jump_view_up"
C-l = "jump_view_right"
"C-," = "goto_previous_buffer"
"C-." = "goto_next_buffer"
"K" = "insert_newline"
# Move line up/down using A-k, A-j
"A-k" = [
"extend_to_line_bounds",
"delete_selection",
"move_line_up",
"paste_before"
]
"A-j" = [
"extend_to_line_bounds",
"delete_selection",
"move_line_down",
"paste_before"
]
[keys.normal.g]
q = ":bc"
Q = ":bc!"
# Remove vscode "training wheels"
# Comment this to enable arrow navigation in insert mode
[keys.insert]
j = { j = "normal_mode" }
"C-space" = "completion"
A-b = ["move_prev_word_start", "collapse_selection"]
A-f = ["move_next_word_end", "move_char_right"]
C-a = "goto_first_nonwhitespace"
C-b = "move_char_left"
C-d = "delete_char_forward"
C-e = "goto_line_end_newline"
C-f = "move_char_right"
C-n = "move_line_down"
C-p = "move_line_up"
# Config Mode
[keys.normal."C-backspace"]
r = [":config-reload", ":reload-all"]
o = ":config-open"
l = ":o ~/.config/helix/languages.toml"
C-g = [":new", ":insert-output lazygit", ":buffer-close", ":redraw"] |
|
well, to this day I had yet to do any rebinding for helix, except the X thing, but i believe these are very good: [keys.normal]
# Vim-like paragraph navigation
"{" = "goto_prev_paragraph"
"}" = "goto_next_paragraph"
# Extend selection up by line
X = "extend_line_up"
# Print the current line's git blame information to the statusline
space.B = ":echo %sh{git blame -L %{cursor_line},+1 %{buffer_name}}"
# Reload config and buffer
A-r = [":config-reload", ":reload"]
# Toggle hidden files in file picker
space.H = ":toggle-option file-picker.hidden"
# Yank diagnostic information
C-y = ":yank-diagnostic"
# Move line up with Ctrl+k
C-k = [
"extend_to_line_bounds",
"delete_selection",
"move_line_up",
"paste_before",
]
# Move line down with Ctrl+j
C-j = ["extend_to_line_bounds", "delete_selection", "paste_after"]
# Navigate down and go to first non-whitespace
ret = ["move_line_down", "goto_first_nonwhitespace"]
# Navigate up and go to first non-whitespace
A-ret = ["move_line_up", "goto_first_nonwhitespace"]
# Open languages.toml config
tab.l = ":o ~/.config/helix/languages.toml"
# Open Helix config
tab.c = ":config-open"
g.e = "goto_file_end" |
|
# https://github.com/helix-editor/helix/pull/14356
[theme]
# https://github.com/helix-editor/helix/pull/14809
light = "omicron_light"
dark = "omicron_dark"
# context: https://github.com/Rudxain/dotfiles/blob/0c13c6fe790da94ea91a125a5ef49b32223f261e/bin/hx-theme
fallback = "dl" # for Termux
[editor]
gutters.layout = ["diagnostics", "spacer", "diff"]
# https://github.com/helix-editor/helix/pull/13206
word-completion = { enable = true, trigger-length = 3 }
cursorline = true
# I know `<space>b`, but I want to "punish" myself
# for having too many buffers
bufferline = "multiple"
# why not show `mode` via `cursor-shape` instead of status-line?
# gnome-term renders thin lines
[editor.statusline]
mode = { normal = "^", insert = "i", select = "v" }
# `total-line-numbers` is an alt for `position-percentage`.
# Despite my love for fractions, "%" is complementary
# (presentation-wise, not information-wise)
# and it's always short.
# TO-DO: replace by [scrollbar](https://github.com/helix-editor/helix/pull/5749)
# when merged.
right = [
"diagnostics",
"selections",
"register",
"position-percentage",
"position",
"file-encoding",
]
[editor.lsp]
# prevent auto-{exec,start}
enable = false
display-inlay-hints = true
inlay-hints-length-limit = 32 # half ~70char
display-progress-messages = true
[keys.normal]
"+" = "increment"
"-" = "decrement"
[keys.normal.backspace]
# zen-mode
# bug: https://github.com/helix-editor/helix/issues/13187
#z = [
# ":set gutters.layout []",
# ":set cursorline false",
# ":set whitespace.render none",
# ":set lsp.display-inlay-hints false",
# ":set inline-diagnostics.cursor-line disable",
# ":set end-of-line-diagnostics disable",
# ":set statusline.diagnostics []",
# ":set statusline.workspace-diagnostics []",
#]
# toggle line-numbers;
# I now understand why Scheme is better than TOML:
# https://github.com/helix-editor/helix/issues/8853
l = """
:toggle gutters.layout \
[\"diagnostics\", \"spacer\", \"line-numbers\", \"spacer\", \"diff\"] \
[\"diagnostics\", \"spacer\", \"diff\"]
"""
c = ":toggle word-completion.trigger-length 1 3"
# useful even for hard-wrapped prose;
# also for collapsing suspiciously-long lines
w = ":toggle soft-wrap.enable"
# debug insidious Unicode shenanigans;
# also reveal malware hidden outside the view-port
s = ":toggle whitespace.render all none"
# arithmetic evaluation
"=" = ":! printf %%s '%{selection}' | bc -l"
# balance between easy-switch and prompting
p.e = ":toggle lsp.enable"
p.r = ":lsp-restart"
p.s = ":lsp-stop"
p.i = ":toggle lsp.display-inlay-hints"
[keys.select]
"+" = "increment"
"-" = "decrement"
[keys.select.backspace]
s = ":toggle whitespace.render all none"
# `|bc` is too short for a keybind
"=" = ":echo %sh{printf %%s '%{selection}' | bc -l}"
p.e = ":toggle lsp.enable"
p.r = ":lsp-restart"
p.s = ":lsp-stop"
p.i = ":set lsp.display-inlay-hints false" |
|
|
Oh, firstly, I love the fact that when I make a selection error selecting spots in multiple lines, or when I work, I can kit C-o to undo, so I added [keys.normal]
b = ["save_selection", "move_prev_word_start"] # selection-save
e = ["save_selection", "move_next_word_end"] # selection-save
B = ["save_selection", "move_prev_long_word_start"] # selection-save
E = ["save_selection", "move_next_long_word_end"] # selection-save
n = ["save_selection", "search_next"] # selection-save
N = ["save_selection", "search_prev"] # selection-save
n = ["save_selection", "extend_search_next"]
N = ["save_selection", "extend_search_prev"]
"C-b" = ["save_selection", "page_up"]
"C-f" = ["save_selection", "page_down"]
"C-u" = ["save_selection", "page_cursor_half_up"]
"C-d" = ["save_selection", "page_cursor_half_down"]
G = ["save_selection", "goto_line"]
[keys.normal.g]
g = ["save_selection", "goto_file_start"]
f = ["save_selection", "goto_file"]
h = ["save_selection", "goto_line_start"]
l = ["save_selection", "goto_line_end"]
[keys.normal."["]
d = ["save_selection", "goto_prev_diag"]
g = ["save_selection", "goto_prev_change"]
p = ["save_selection", "goto_prev_paragraph"]
[keys.normal."]"]
d = ["save_selection", "goto_next_diag"]
g = ["save_selection", "goto_next_change"]
p = ["save_selection", "goto_next_paragraph"]
[keys.normal.space]
"/" = ["save_selection", "global_search"]
f = ["save_selection", "file_picker"]
b = ["save_selection", "buffer_picker"]
[keys.normal.m]
m = ["save_selection", "match_brackets"]
s = ["save_selection", "surround_add"]
r = ["save_selection", "surround_replace"]
d = ["save_selection", "surround_delete"]
a = ["save_selection", "select_textobject_around"]
i = ["save_selection", "select_textobject_inner"] # selection-saveI usually need to select a word, or all what's within spaces, and to more easily remember how to increment numbers: "+" = ["increment"]
"-" = ["decrement"]
W = "@miW"
w = "@miw"The yazi&lazygit opening bindings are there too. [keys.normal.space.space.g]
a = ":sh gama bake"
b = ":sh gama build -r"
t = ":sh gama build -r -cc .tcc"
u = ":sh gama update"
d = ":sh gama dev"
c = ":sh gama clean"I love to see well all the spaces: [editor.whitespace.render]
space = "all"
tab = "all"
nbsp = "all"
nnbsp = "all"
newline = "all"
[editor.whitespace.characters]
space = "·"
nbsp = "⍽"
nnbsp = "␣"
tab = "→"
newline = "⏎"
tabpad = " "The fact that sometimes I end up editing a file modifyed by external tools(like git) and I am forced to open externally and try to merge changes is really annoying. It relly disturbs with some file watcher dev tools, but whatever: [editor.auto-save]
focus-lost = true
after-delay = {enable = true, timeout = 5000}I created a custom theme 'ama', which is highly influenced by theme = "ama"
[editor]
auto-format = true
line-number = "relative"
mouse = false
shell = ["fish", "-c"]
rulers = [50, 79, 100]
bufferline = "multiple"
color-modes = true
gutters = ["diff", "diagnostics", "line-numbers", "spacer"]
end-of-line-diagnostics = "hint"
scrolloff = 0
default-yank-register = "\""
middle-click-paste = false
scroll-lines = 0
completion-timeout = 5
completion-trigger-len = 1
cursorline = true
trim-final-newlines = true
trim-trailing-whitespace = true
popup-border = "all"
jump-label-alphabet = "jklmasdfghwobceinpqrtuvxyz"
[editor.statusline]
left = ["mode", "spinner", "position", "selections", "register"]
center = ["version-control", "file-name", "total-line-numbers"]
right = ["diagnostics", "file-encoding", "file-line-ending", "file-type"]
separator = "┊"
#"│"
mode.normal = "NORMAL"
mode.insert = "INSERT"
mode.select = "SELECT"
diagnostics = ["warning", "error", "hint"]
workspace-diagnostics = ["warning", "error", "hint"]and that's pretty much it, for now at least. |
|
I looked everywhere for a basic set of Dvorak bindings for Helix without any luck, so I made my own. Most of the default bindings work just fine in Dvorak due to Helix's mnemonic-based key choices (e.g. "gw" for [keys.normal]
d = "move_char_left"
h = "move_visual_line_down"
t = "move_visual_line_up"
n = "move_char_right"
D = "goto_line_start"
H = "page_cursor_half_down"
T = "page_cursor_half_up"
N = "goto_line_end"
j = "delete_selection" # "Junk"
k = "find_till_char"
K = "till_prev_char"
l = "search_next"
L = "search_prev"
[keys.normal."C-w"]
# Keep synchronized with space.w
d = "jump_view_left"
h = "jump_view_down"
t = "jump_view_up"
n = "jump_view_right"
D = "swap_view_left"
H = "swap_view_down"
T = "swap_view_up"
N = "swap_view_right"
[keys.normal.space.w]
# Keep synchronized with "C-w"
d = "jump_view_left"
h = "jump_view_down"
t = "jump_view_up"
n = "jump_view_right"
D = "swap_view_left"
H = "swap_view_down"
T = "swap_view_up"
N = "swap_view_right"
[keys.normal.space]
t = "hover" # Look "up" docs
[keys.select]
d = "extend_char_left"
h = "extend_visual_line_down"
t = "extend_visual_line_up"
n = "extend_char_right"
k = "extend_till_char"
K = "extend_till_prev_char"
l = "extend_search_next"
L = "extend_search_prev"
[keys.select.g]
h = "extend_line_down"
t = "extend_line_up" |
|
This is my config. I haven't fully switched to Helix yet, mainly just experimenting, although I do want to at some point (maybe if plugins finally become a thing) theme = "catppuccin_mocha"
[editor]
line-number = "absolute"
cursorline = true
color-modes = true
true-color = true
scrolloff = 99
default-yank-register = "+"
bufferline = "always"
atomic-save = true
trim-final-newlines = true
trim-trailing-whitespace = true
popup-border = "all"
editor-config = true
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.indent-guides]
render = true
[editor.statusline]
left = [ "mode", "file-name", "file-modification-indicator" ]
right = [ "file-type", "position", "version-control", "spacer", "diagnostics", "spinner" ]
mode.normal = " n"
mode.insert = " i"
mode.select = " s"
[editor.lsp]
enable = true
display-messages = true
display-progress-messages = true
[editor.file-picker]
hidden = false
git-ignore = true
follow-symlinks = true
[editor.auto-pairs]
'(' = ')'
'{' = '}'
'[' = ']'
'"' = '"'
'`' = '`'
'<' = '>'
[editor.auto-save]
focus-lost = true
after-delay.enable = true
after-delay.timeout = 30000
[editor.inline-diagnostics]
cursor-line = "warning"
other-lines = "warning"
[keys.normal]
";" = "insert_mode"
"i" = "move_line_up"
"j" = "move_char_left"
"k" = "move_line_down"
"l" = "move_char_right"
up = "no_op"
down = "no_op"
left = "no_op"
right = "no_op"
"C-i" = "jump_view_right"
"C-k" = "jump_view_up"
"C-j" = "jump_view_down"
"C-l" = "jump_view_left"
[keys.insert]
up = "no_op"
down = "no_op"
left = "no_op"
right = "no_op"
[keys.select]
up = "no_op"
down = "no_op"
left = "no_op"
right = "no_op"
"i" = "move_line_up"
"j" = "move_char_left"
"k" = "move_line_down"
"l" = "move_char_right"
[keys.normal.t]
"T" = "file_explorer"
[keys.normal." "]
"l" = { "g" = [ ":write-all", ":new", ":insert-output lazygit", ":buffer-close!", ":redraw", ":reload-all" ]}
"w" = ":write"
"q" = ":quit"
[keys.normal.h]
"K" = ":hsplit"
"L" = ":vsplit" |
|
I know that a lot of people will find this absolutely atrocious, but for those who wonder what a configuration based on "gamer WASD" movements would look like, here is my config: # helix 25.07.1 (5ad9f1ae)
# ══════════════════════════════════════════════════════════════════════════ #
# ROLOEDITS incons-v2 baranch only: helix 25.07.1 (e14fc2d6)
# (https://github.com/helix-editor/helix/pull/12369)
# ══════════════════════════════════════════════════════════════════════════ #
# [icons.ui.indicator]
# readonly = { glyph = "", color = "#ff0000" }
# modified = { glyph = "", color = "#0070ff" }
# [icons.vcs]
# enabled = true
# branch = "" # not really any "branch" in jj, though bookmarks are similar
# [icons.fs]
# enabled = true
# jjdescription = { glyph = "", color = "#2f9fdf" }
# [icons.kind]
# enabled = true
# color = " "
# [icons.ui]
# workspace = "" # gets rid of the `W` in the diagnostics statusline
# [icons.ui.statusline]
# separator = "┊"
# [icons.ui.virtual]
# indentation = "▏"
# ruler = "┊"
# ══════════════════════════════════════════════════════════════════════════ #
[theme]
# dark = "catppuccin_mocha"
dark = "neonotte"
light = "onelight"
# ════════════════════════════════════════════════════════════════════════════╗
# Core Editor Settings ║
# ════════════════════════════════════════════════════════════════════════════╝
[editor]
# ╔═══════╗
# ⓘ MISC ║
# ╚═══════╝
idle-timeout = 30 # milliseconds
# rulers = [80, 120, 150]
color-modes = true
line-number = "relative"
end-of-line-diagnostics = "hint" # Minimum severity to show a diagnostic after the end of a line
popup-border = "all"
bufferline = "multiple"
completion-timeout = 50
cursorline = true
shell = ["zsh", "-c"]
scroll-lines = 2
# ╔════════╗
# ⓘ Mouse ║
# ╚════════╝
mouse = true
middle-click-paste = true
# ╔═════════════════╗
# ⓘ Character Jump ║
# ╚═════════════════╝
# 💡 jump to two character label alphabet that can be used [key / macro : gw, key : normal.@]
# z
# q d (⇧)k l (⇧)m
jump-label-alphabet = "qzdklm"
[editor.auto-pairs]
'(' = ')'
'{' = '}'
'[' = ']'
'"' = '"'
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.file-picker]
hidden = false
[editor.indent-guides]
render = true
character = "▏"
skip-levels = 1
[editor.inline-diagnostics]
# Minimum severity to show a diagnostic on the primary cursor's line.
# note that `cursor-line` diagnostics are hidden in insert mode.
cursor-line = "hint"
other-lines = "disable" # "error"
[editor.lsp]
display-messages = true
display-inlay-hints = true
snippets = true
[editor.smart-tab]
enable = false
[editor.soft-wrap]
enable = true
max-wrap = 25
# ════════════════════════════════════════════════════════════════════════════╗
# UI Elements Configuration ║
# ════════════════════════════════════════════════════════════════════════════╝
[editor.statusline]
left = ["mode", "spinner", "spacer", "file-name", "separator", "spacer", "version-control"]
center = [
"diagnostics",
"separator",
"workspace-diagnostics",
"spacer",
"register",
"separator",
]
right = [
"selections",
"register",
"position",
"total-line-numbers",
"file-encoding",
"file-line-ending", "file-type",
]
mode.normal = "NORMAL"
mode.insert = "INSERT"
mode.select = "SELECT"
[editor.whitespace.characters]
newline = "·"
tab = "→"
[editor.whitespace.render]
space = "none"
tab = "all"
nbsp = "none"
nnbsp = "none"
newline = "all"
# ════════════════════════════════════════════════════════════════════════════╗
# Insert Mode Keybindings ║
# ════════════════════════════════════════════════════════════════════════════╝
[keys.insert]
# ╔═════════════════════╗
# ⓘ Snippet Navigation ║
# ╚═════════════════════╝
"A-S-ret" = "goto_prev_tabstop"
"A-ret" = "goto_next_tabstop"
# tab = "extend_parent_node_end"
# S-tab = "move_parent_node_start"
# https://github.com/helix-editor/helix/pull/9801/commits/1badd9e4342df7864e6d780be059897db0a0941d
"S-tab" = "unindent"
"C-c" = ":clipboard-yank-join"
"C-v" = ":clipboard-paste-before"
"C-S-v" = ":clipboard-paste-after"
"C-A-v" = ":clipboard-paste-replace"
[keys.normal]
# ╔════════════════════╗
# ⓘ Buffer Management ║
# ║ Window ║
# ╚════════════════════╝
# ┏━━━━━━━━━━━━━━━━┓
# ┃ macos keyboard ┃
# ┗━━━━━━━━━━━━━━━━┛
"°" = ":buffer-previous"
"_" = ":buffer-next"
"0" = ":buffer-close"
# ┏━━━━━━━━━━━━━┓
# ┃ pc keyboard ┃
# ┗━━━━━━━━━━━━━┛
"A-home" = "rotate_view"
"home" = ":buffer-previous"
"pageup" = ":buffer-next"
"S-del" = ":buffer-close"
"S-q" = "rotate_view_reverse"
"S-d" = "rotate_view"
"S-a" = "wclose"
"S-e" = "wonly"
"ins" = "goto_last_accessed_file"
"S-home" = "wclose"
"A-del" = "wonly"
# ╭╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮
# ┊ https://github.com/sxyazi/yazi/pull/2461 ┊
# ╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
"A-f" = [
":sh rm -f /tmp/yazi-helix",
":insert-output [[ %{buffer_name} == \"[scratch]\" ]] && yazi %{current_working_directory} --chooser-file=/tmp/yazi-helix || yazi %{buffer_name} --chooser-file=/tmp/yazi-helix", # if this is a [scratch] buffer, open yazi in working directory instead
':insert-output echo "\x1b[?1049h\x1b[?2004h" > /dev/tty', # These sequences help restore proper terminal state after Yazi exits: \x1b[?1049h switches to alternate screen buffer | \x1b[?2004h enables bracketed paste mode
":open %sh{cat /tmp/yazi-helix}", # Reads the file path that Yazi saved to the temp file
":redraw", # Necessary after running external terminal programs to fix visual artifacts
# manage conflict of mouse integration between helix and yazi
":set mouse false",
":set mouse true",
]
# ╭───────────────────────╮
# │ replace using `Serpl` │
# ╰───────────────────────╯
"A-r" = [
":write-all", # save edits first
":insert-output serpl >/dev/tty", # run Serpl in the terminal
":redraw", # fix UI after TUI exits
":reload-all", # sync changed files
]
# ╭────────╮
# │ Splits │
# ╰────────╯
"S-pageup" = ":vsplit-new"
"S-ins" = ":hsplit-new"
# ╔═══════════════════╗
# ⓘ Git within Helix ║
# ╚═══════════════════╝
"A-g" = [":new", ":insert-output lazygit", ":buffer-close!", ":redraw"]
# ╔═════════╗
# ⓘ Search ║
# ╚═════════╝
"w" = "search_selection_detect_word_boundaries"
"?" = "search"
"," = "global_search"
"€" = ":lsp-workspace-command"
# ╔═══════╗
# ⓘ Quit ║
# ╚═══════╝
"C-q" = [":lsp-stop", ":quit"]
"C-A-q" = [":lsp-stop", ":quit!"]
# ╔══════════╗
# ⓘ History ║
# ╚══════════╝
"left" = "earlier"
"right" = "later"
# ╔═════════════════════╗
# ⓘ Snippet Navigation ║
# ╚═════════════════════╝
"A-S-ret" = "goto_prev_tabstop"
"A-ret" = "goto_next_tabstop"
# ╔═════════════════╗
# ⓘ Mode Switching ║
# ╚═════════════════╝
"i" = "insert_mode"
"S-i" = "append_mode"
"o" = "select_mode"
"esc" = ["collapse_selection", "keep_primary_selection"]
"S-r" = "replace"
# ╔═══════════╗
# ⓘ Movement ║
# ╚═══════════╝
# ▷ [] Basic Movement
"z" = "move_visual_line_up"
"s" = "move_visual_line_down"
"q" = "move_char_left"
"d" = "move_char_right"
"a" = ["move_prev_word_start", "trim_selections"]
"e" = ["move_next_word_end", "trim_selections"]
"A-S-z" = "scroll_up"
"A-S-s" = "scroll_down"
# ▷ [] Advanced Movement
"A-;" = "scroll_up" # using `shift` or `.` won't work
";" = "scroll_down"
"S-z" = ["page_cursor_half_up", "align_view_center", "align_view_middle"]
"S-s" = ["page_cursor_half_down", "align_view_center", "align_view_middle"]
"S-k" = "goto_first_nonwhitespace"
"S-m" = "goto_line_end_newline"
"*" = "goto_definition"
"k" = "flip_selections"
"S-g" = "goto_word"
"@" = "@gw" #
"²" = "@gw" #
"u" = "copy_selection_on_next_line"
"S-u" = "copy_selection_on_prev_line"
# ▷ [] Search and Navigation
"§" = "symbol_picker"
"C-b" = "@ b%flags + %path "
"A-b" = "@ b%id "
"!" = "file_explorer_in_current_buffer_directory"
"f" = "goto_next_function"
"S-f" = "goto_prev_function"
"μ" = { "s" = "save_selection", "q" = "jump_backward", "d" = "jump_forward", "ret" = "jumplist_picker" } # jump list
# ▷ [] Line Operations
"l" = [
"collapse_selection",
"goto_first_nonwhitespace",
"select_mode",
"extend_to_line_end",
"exit_select_mode",
]
"S-l" = [
"collapse_selection",
"goto_first_nonwhitespace",
"select_mode",
"extend_to_line_end",
]
"j" = ["extend_to_line_bounds", "delete_selection", "paste_after"]
"S-j" = [
"extend_to_line_bounds",
"delete_selection",
"move_line_up",
"paste_before",
]
# ▷ [] System Clipboard Operations
"c" = "yank_to_clipboard"
"v" = "paste_clipboard_before"
"A-v" = "replace_selections_with_clipboard"
# ⚠ no primary clipboard on macos ▶ using custom register `a` instead
"C-c" = '@"ay' # yank to register `a` : "a ▶ y
"C-v" = '@"aP' # paste register `a` before : "a ▶ P
"C-A-v" = '@<backspace>"aP' # replace with register `a` : ▶ "a ▶ P
# ▷ [] Yank operations
"S-c" = "yank"
"S-v" = "paste_before"
"S-A-v" = "replace_with_yanked"
# ▷ [] Line Manipulation
"ret" = ["goto_line_end", "move_char_right", "insert_newline"]
"S-ret" = "insert_newline"
# ▷ [] Code Operations
"r" = "rename_symbol"
"#" = "toggle_comments"
"h" = "hover"
"S-h" = ":character-info"
"S-y" = ":format"
# ▷ [] Deletion Operations
"backspace" = "delete_selection"
"x" = "delete_word_backward"
"S-x" = "delete_word_forward"
"A-backspace" = ["goto_line_end_newline", "kill_to_line_start"] # for some reason `S-backspace` is no longer working
"del" = "change_selection"
# ▷ [] Other Operations
"tab" = "indent"
"S-tab" = "unindent"
"A-tab" = "smart_tab"
"=" = "file_picker_in_current_directory"
"+" = "increment"
'minus' = "decrement"
# ▷ [] Shell commands and integration
"|" = "shell_pipe"
"ù" = "shell_insert_output"
"£" = "@:run-shell-command "
"$" = "shell_pipe_to"
# ▷ [] surround selection automatically
"[" = "@ms["
"(" = "@ms("
"{" = "@ms{"
# ▷ [] selection
"S-left" = ["select_mode", "extend_char_left"]
"S-right" = ["select_mode", "extend_char_right"]
# ▷ [] Disabled Keys
pagedown = "no_op"
end = "no_op"
# =============| 🫵🏻Menus |=============
# ╭─────────────────╮
# │ INSERT FILE/DIR │
# ╰─────────────────╯
[keys.normal."S-A-f"]
"d" = [""":insert-output fd -t d | fzf \
--prompt '📁 Directories › ' \
--header 'Select a directory (↑↓ navigate, Enter confirm, Esc cancel)' \
--preview 'eza -lah --icons --color=always --group-directories-first {}' \
--preview-window 'right:60%%' --border --height 80%%""", ":redraw"]
"f" = [""":insert-output fd -t f | fzf \
--prompt '📄 Files › ' \
--header 'Select a file (↑↓ navigate, Enter confirm, Esc cancel)' \
--preview 'bat --style=numbers --color=always {}' \
--preview-window 'right:60%%' --border --height 80%%""", ":redraw"]
# ╔════════════════════╗
# ⓘ Buffer Management ║
# ║ Window ║
# ╚════════════════════╝
[keys.normal."b"]
c = ":buffer-close"
o = ":buffer-close-others"
n = ":new"
x = ":buffer-close!"
a = ":buffer-close-all"
left = ":buffer-previous"
q = "goto_previous_buffer"
right = ":buffer-next"
d = "goto_next_buffer"
f = "file_explorer_in_current_buffer_directory"
p = "buffer_picker"
[keys.normal."g"]
u = ":run-shell-command brave %{selection}" # goto Url
e = ["goto_last_line", "goto_line_end_newline"]
# h = "goto_hover"
# C-h = ["vsplit", "jump_view_up", "goto_hover"]
[keys.normal."space"]
"i" = [":insert-output typst-search-pkg", ":redraw"]
# ╭───────────────────────────────────────────╮
# │ GOTO PREV │
# │ (`}` because `[` is used for surrounding) │
# ╰───────────────────────────────────────────╯
[keys.normal."}"]
"t" = "goto_prev_class"
"f" = "goto_prev_function"
"d" = "goto_prev_diag"
"c" = "goto_prev_change"
"e" = "goto_prev_entry"
"a" = "goto_prev_parameter"
"p" = "goto_prev_paragraph"
"T" = "goto_prev_test"
"x" = "goto_prev_xml_element"
"tab" = "goto_prev_tabstop"
# ═══════════════════════════╗
# Select Mode Keybindings ║
# ═══════════════════════════╝
[keys.select]
"#" = ["toggle_comments", "select_mode"]
# ╔═════════════════════╗
# ⓘ Snippet Navigation ║
# ╚═════════════════════╝
"A-S-ret" = "goto_prev_tabstop"
"A-ret" = "goto_next_tabstop"
# ╔═══════╗
# ⓘ MODE ║
# ╚═══════╝
"o" = "normal_mode"
# ╔═══════════════════════╗
# ⓘ Selection Navigation ║
# ╚═══════════════════════╝
"backspace" = "delete_selection"
# ▷ [] basics
"S-left" = "extend_char_left"
"S-right" = "extend_char_right"
"q" = "extend_char_left"
"d" = "extend_char_right"
"s" = ["extend_line_down", "extend_to_line_end"]
"z" = ["extend_line_up", "extend_to_line_start"]
# ▷ [] Line
"S-z" = [
"extend_line_above",
"extend_line_above",
"extend_line_above",
"extend_to_line_start",
]
"S-s" = [
"extend_line_down",
"extend_line_down",
"extend_line_down",
"extend_to_line_end",
]
"S-k" = "extend_to_line_start"
"S-m" = "extend_to_line_end"
# ▷ [] word
"a" = "extend_prev_word_end"
"e" = "extend_next_word_start"
# ╔════════════════════════════╗
# ⓘ Yanking: System Clipboard ║
# ╚════════════════════════════╝
"c" = "yank_to_clipboard"
"v" = "paste_clipboard_before"
"A-v" = "replace_selections_with_clipboard"
# ╔════════════════════════╗
# ⓘ Yanking: register `a` ║
# ╚════════════════════════╝
# ⚠ no primary clipboard on macos ▶ using custom register `a` instead
"C-c" = '@"ay' # yank to register `a` : "a ▶ y
"C-v" = '@"aP' # paste register `a` before : "a ▶ P
"C-A-v" = '@<backspace>"aP' # replace with register `a` : ← ▶ "a ▶ , "aP = ":buffer-close-all"; ← : delete_selection
# ╔══════════╗
# ⓘ Yanking ║
# ╚══════════╝
"S-c" = "yank"
"S-v" = "paste_before"
"S-A-v" = "replace_with_yanked"
# ╔════════════════════════╗
# ⓘ Selection Manipulation ║
# ╚════════════════════════╝
"%" = "select_all"
# ▷ expand/shrink selection
"p" = "expand_selection"
"S-p" = "shrink_selection"
# ▷ trim
"f" = "trim_selections"
# ▷ quick line select
"l" = [
"collapse_selection",
"goto_first_nonwhitespace",
"select_mode",
"extend_to_line_end",
"exit_select_mode",
]
"S-l" = [
"collapse_selection",
"goto_first_nonwhitespace",
"select_mode",
"extend_to_line_end",
]
# ╔═════════════════════════════════╗
# ⓘ Regex based selection operation ║
# ╚═════════════════════════════════╝
# ▷ select match
"r" = "select_regex"
"?" = "select_regex"
# ▷ split
"S-r" = "split_selection"
"/" = "split_selection"
# ▷ keep match
"k" = "keep_selections"
"=" = "keep_selections"
# ╔════════════════════════╗
# ⓘ EZ surround selection ║
# ╚════════════════════════╝
"[" = "@ms["
"(" = "@ms("
"{" = "@ms{"
"€" = ":lsp-workspace-command"
# (un)indent exits select mode
"S-tab" = ["unindent", "select_mode"]
"tab" = ["indent", "select_mode"] |
|
After playing with helix for a bit, I think it should have slightly different default hotkeys. You can see them below. Yes, I swap I don't know why lowercase
[keys.normal]
m = "select_regex"
M = "split_selection"
r = "replace_with_yanked"
X = "select_line_above"
"tab" = "goto_last_accessed_file"
S = "@simc"
[keys.normal.s]
m = "match_brackets"
s = "surround_add"
r = "surround_replace"
d = "surround_delete"
i = "select_textobject_inner"
a = "select_textobject_around"
w = "@siw"
W = "@siW"
p = "@sap"
b = "@sim"
c = "@sic"
l = "@vgl<esc>"
h = "@vgh<esc>"
[keys.select]
x = "extend_line"
m = "select_regex"
M = "split_selection"
[keys.select.s]
m = "match_brackets"
s = "surround_add"
r = "surround_replace"
d = "surround_delete"
i = "select_textobject_inner"
a = "select_textobject_around"
w = "@siw"
W = "@siW"
p = "@sap"
b = "@sim"
c = "@sic"
l = "@gl"
h = "@gh"
[keys.insert]
C-i = "insert_register"
C-v = "paste_before"
C-a = "insert_at_line_start"
C-e = "insert_at_line_end"
[keys.normal.space]
g = "global_search"If these were the defaults, I would be so happy. |
|
I am a fresh user, and I bet I will reuse a ton of configline from this thread :) |
|
|
I am using Helix for 2 years now and its my go to editor. I want to thank the maintainers for creating something stable and awesome to use. Here my config its highly opinionated but maybe interesting for somebody out there: theme = "gruvbox"
[editor]
scroll-lines = 1
cursorline = true
auto-save = false
completion-trigger-len = 2
true-color = true
color-modes = true
auto-pairs = true
idle-timeout = 200
completion-timeout = 100
preview-completion-insert = true
bufferline = "multiple"
gutters = ["diff", "diagnostics", "line-numbers", "spacer"]
soft-wrap.enable = true
auto-info = true
popup-border = "all"
mouse = true
end-of-line-diagnostics = "hint"
[editor.inline-diagnostics]
cursor-line = "warning"
other-lines = "error"
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.indent-guides]
render = true
character = "╎"
[editor.lsp]
auto-signature-help = true
display-messages = true
display-inlay-hints = true
[editor.statusline]
left = ["mode", "spinner", "file-name", "total-line-numbers"]
center = ["version-control"]
right = ["diagnostics", "spacer", "file-encoding", "position", "file-line-ending"]
[keys.normal]
C-g = [":new", ":insert-output lazygit", ":buffer-close!", ":redraw"]
C-a = ":write-all"
C-h = "select_prev_sibling"
C-j = "shrink_selection"
C-k = "expand_selection"
C-l = "select_next_sibling"
V = ["select_mode", "extend_to_line_bounds"]
D = ["extend_to_line_end", "delete_selection"]
i = ["insert_mode", "collapse_selection"]
a = ["append_mode", "collapse_selection"]
u = ["undo", "collapse_selection"]
esc = ["collapse_selection", "keep_primary_selection"]
j = "move_line_down"
k = "move_line_up"
y = "yank"
Y = "yank_to_clipboard"
"tab" = "goto_next_buffer"
"S-tab" = "goto_previous_buffer"
"C-q" = ":bc"
[keys.insert]
"esc" = ["collapse_selection", "normal_mode"]
[keys.select]
C-j = "shrink_selection"
C-k = "expand_selection"
k = ["extend_line_up", "extend_to_line_bounds"]
j = ["extend_line_down", "extend_to_line_bounds"]
y = "yank"
Y = "yank_to_clipboard"
esc = ["collapse_selection", "keep_primary_selection", "normal_mode"]
|
|
Using my project forgelink to copy or open a link to the line in my buffer, [keys.normal.space.l]
c = ":sh forgelink copy \"%{file_path_absolute}:%{selection_line_start}-%{selection_line_end}\""
o = ":sh forgelink open \"%{file_path_absolute}:%{selection_line_start}-%{selection_line_end}\"" |
|
Recently started searching more about snippets: [keys.normal."@"] # @ for snippets
[keys.normal."@".p] # proto
# type after a `ServiceName<cur>` in grpc to create Resp and Req msgs at eof
r = "@hb\"1yirpc<space><esc>a(<esc>\"1paRequest<esc>la<space>returns<space>(<esc>\"1paResponse<esc>la;<esc>ge]<space>]<space>jjimessage<space><esc>\"1<S-P>a<S-R>equest<space>{<esc>omessage<space><esc>\"1<S-P>a<S-R>esponse<space>{<esc>kgli<ret>"
[keys.normal."@".c] # copy c function signature to header file in rsplit
h = "@<C-s>]f<A-;>t{\"1y<space>wlo<C-r>1;<esc><space>wh<C-o>"
[keys.normal."#"] # build, run, diagnostics
# saves with <C-s> so you can view message with <C-o>
"n" = "@:o .diag<ret>;/^[^ \t].+:\\d+:\\d+<ret><C-s>\"dy:o <C-r>d<ret>"
# previous diagnostic
"p" = "@:o .diag<ret><A-;>;?^[^ \t].+:\\d+:\\d+<ret><C-s>\"dy:o <C-r>d<ret>"
# open current diagnostic
"o" = "@gl?^[^ \t].+:\\d+:\\d+<ret><C-s>\"dy:o <C-r>d<ret>"
# open unsaved diagnostics file
"d" = "@:o .diag<ret>"
[keys.normal."#".z] # zig
# build
"b" = "@:o .diag<ret>%d!(zig build run | complete).stderr<ret>gg/^[^ \t].+:\\d+:\\d+<ret><C-s>"
# build and open first diagnostic
"z" = "@:o .diag<ret>%d!(zig build run | complete).stderr<ret>gg/^[^ \t].+:\\d+:\\d+<ret><C-s>\"dy:o <C-r>d<ret>" |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
From #1335 (comment).
Post anything that you want to share from your
config.toml!All reactions