-
Notifications
You must be signed in to change notification settings - Fork 2
/
.inputrc
55 lines (42 loc) · 1.85 KB
/
.inputrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Use case-insensitive completion
set completion-ignore-case on
# Show matches immediately instead of ringing the bell when the completion is ambiguous
set show-all-if-ambiguous on
# Immediately add a trailing slash when autocompleting symlinks to directories
set mark-symlinked-directories on
# Show extra file information when completing, like `ls -F` does
set visible-stats on
# Allow UTF-8 input and output, instead of showing stuff like $'\0123\0456'
set input-meta on
set output-meta on
set convert-meta off
# Don’t prompt unless there are over 500 possible completions
set completion-query-items 500
# Be more intelligent when autocompleting by also looking at the text after
# the cursor. For example, when the current line is "cd ~/src/mozil", and
# the cursor is on the "z", pressing Tab will not autocomplete it to "cd
# ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the
# Readline used by Bash 4.)
set skip-completed-text on
# Show all autocomplete results at once
set page-completions off
# Do not autocomplete hidden files unless the pattern explicitly begins with a dot
set match-hidden-files off
# Use color from LS_COLORS when completing files/dirs
$if bash
set colored-stats on
$endif
# set-mark, kill-region, kill-ring-save/copy-region-as-kill like emacs
"\C-SPACE": set-mark
"\C-x\C-k": kill-region
"\e-w": copy-region-as-kill
# bind backward-kill-word like emacs, tty C-w sucks.
"\C-w": backward-kill-word
# These only make sense in a shell
$ if Bash
# find file in project via emacs
"\C-x\C-f": 'emacsclient --no-wait --eval "(select-frame-set-input-focus (selected-frame))" "(counsel-projectile-find-file)"\C-m'
# open magit for current directory
# note: overwrites default binding of "\C-xg": glob-list-expansions
"\C-xg": 'emacsclient --no-wait --eval "(select-frame-set-input-focus (selected-frame))" "(magit-status)"\C-m'
$endif