Share configs #1360
Replies: 18 comments 21 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" |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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" |
Beta Was this translation helpful? Give feedback.
-
Why |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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"
"{" = "move_prev_paragraph"
"}" = "move_next_paragraph"
"left" = "goto_previous_buffer"
"right" = "goto_next_buffer"
"space" = { "q" = ":bc" }
[keys.select]
j = "extend_line_up"
k = "extend_line_down"
# "{" = "extend_prev_paragraph" # doesn't exist yet
# "}" = "extend_next_paragraph" |
Beta Was this translation helpful? Give feedback.
-
I like to keep what I'm used to, so:
|
Beta Was this translation helpful? Give feedback.
-
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" |
Beta Was this translation helpful? Give feedback.
-
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" |
Beta Was this translation helpful? Give feedback.
-
Till now I don't know how to configure powershell lsp ;-( |
Beta Was this translation helpful? Give feedback.
-
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"
|
Beta Was this translation helpful? Give feedback.
-
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"} |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Just set it up to my liking: # A dark theme with strongly different colors (even separate mut) and a visible selection
theme = "ayu_evolve"
[editor]
line-number = "relative"
# I like my cursor types easily differentiable and box fits more to select than normal
[editor.cursor-shape]
insert = "bar"
normal = "underline"
select = "block"
# Mostly standard statusline but with git brach and total lines
[editor.statusline]
left = ["mode", "spinner", "version-control", "file-name", "file-modification-indicator"]
right = ["diagnostics", "selections", "position", "separator", "file-encoding", "total-line-numbers"]
[editor.lsp]
display-inlay-hints = true
auto-signature-help = true
# <> Pair for generics, doesn't seem to be working everywhere
[editor.auto-pairs]
'<' = '>'
'[' = ']'
'(' = ')'
'{' = '}'
'"' = '"'
'`' = '`'
"'" = "'"
# Indent guides cause I like em
[editor.indent-guides]
render = true
character = "┊"
skip-levels = 1
# I like soft wrapping
[editor.soft-wrap]
enable = true
max-wrap = 25 Mostly just aesthetics. |
Beta Was this translation helpful? Give feedback.
-
theme = "catppuccin_mocha"
[editor]
bufferline = "multiple"
color-modes = true
line-number = "relative"
mouse = true
rulers = [80]
scrolloff = 8
true-color = true
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.file-picker]
hidden = false
[editor.indent-guides]
render = true
[editor.lsp]
display-inlay-hints = true
display-messages = true
[editor.statusline]
center = ["file-name"]
left = ["mode", "spinner", "version-control"]
right = ["diagnostics", "selections", "position-percentage", "position", "file-encoding", "file-line-ending", "file-type"]
separator = "│"
[editor.statusline.mode]
insert = "INSERT"
normal = "NORMAL"
select = "SELECT"
[keys]
[keys.normal]
A-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"]
A-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"]
A-x = "extend_to_line_bounds"
X = ["extend_line_up", "extend_to_line_bounds"]
esc = ["collapse_selection", "keep_primary_selection"]
[keys.normal.space]
q = ":quit"
w = ":write"
[keys.select]
A-x = "extend_to_line_bounds"
X = ["extend_line_up", "extend_to_line_bounds"] |
Beta Was this translation helpful? Give feedback.
-
I'm running a custom gruvbox theme: https://github.com/jeronimobarea/helix_gruvbox_community theme = "gruvbox_community"
[editor.indent-guides]
render = true
character = "│"
[editor.statusline]
left = ["mode", "spacer", "version-control", "spacer", "diagnostics", "file-name"]
right = ["position-percentage", "spacer", "position"]
mode.normal = "N"
mode.insert = "I"
mode.select = "S"
[editor]
scrolloff = 8
rulers = [80]
line-number = "relative"
cursorline = true
bufferline = "always"
true-color = true
mouse = false
color-modes = true
[editor.file-picker]
hidden = false
[editor.lsp]
display-messages = true
[keys.normal]
"esc" = [ "normal_mode", ":format" , ":write" ] # For quick saving
"#" = "toggle_comments"
"{" = "goto_prev_paragraph"
"}" = "goto_next_paragraph"
[keys.normal.space]
q = ":bc"
o = "file_picker_in_current_buffer_directory"
[keys.normal.space.w]
r = ":rla" |
Beta Was this translation helpful? Give feedback.
-
From #1335 (comment).
Post anything that you want to share from your
config.toml
!Beta Was this translation helpful? Give feedback.
All reactions