-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
98 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
local M = {} | ||
|
||
M.name = "misc" | ||
|
||
local misc = { | ||
windows = { | ||
["<c-w>"] = { | ||
name = "window", | ||
s = "Split window", | ||
v = "Split window vertically", | ||
w = "Switch windows", | ||
q = "Quit a window", | ||
T = "Break out into a new tab", | ||
x = "Swap current with next", | ||
["-"] = "Decrease height", | ||
["+"] = "Increase height", | ||
["<lt>"] = "Decrease width", | ||
[">"] = "Increase width", | ||
["|"] = "Max out the width", | ||
["="] = "Equally high and wide", | ||
h = "Go to the left window", | ||
l = "Go to the right window", | ||
k = "Go to the up window", | ||
j = "Go to the down window", | ||
}, | ||
}, | ||
z = { | ||
["z"] = { | ||
o = "Open fold under cursor", | ||
O = "Open all folds under cursor", | ||
c = "Close fold under cursor", | ||
C = "Close all folds under cursor", | ||
a = "Toggle fold under cursor", | ||
A = "Toggle all folds under cursor", | ||
v = "Show cursor line", | ||
M = "Close all folds", | ||
R = "Open all folds", | ||
m = "Fold more", | ||
r = "Fold less", | ||
x = "Update folds", | ||
z = "Center this line", | ||
t = "Top this line", | ||
b = "Bottom this line", | ||
g = "Add word to spell list", | ||
w = "Mark word as bad/misspelling", | ||
}, | ||
}, | ||
nav = { | ||
["[{"] = "Previous {", | ||
["[("] = "Previous (", | ||
["[<"] = "Previous <", | ||
["[m"] = "Previous method start", | ||
["[M"] = "Previous method end", | ||
["[%"] = "Previous unmatched group", | ||
["[s"] = "Previous misspelled word", | ||
["]{"] = "Next {", | ||
["]("] = "Next (", | ||
["]<lt>"] = "Next <", | ||
["]m"] = "Next method start", | ||
["]M"] = "Next method end", | ||
["]%"] = "Next unmatched group", | ||
["]s"] = "Next misspelled word", | ||
["H"] = "Home line of window (top)", | ||
["M"] = "Middle line of window", | ||
["L"] = "Last line of window", | ||
}, | ||
g = { | ||
["gf"] = "Got to file under cursor", | ||
["gx"] = "Open the file under cursor with system app", | ||
["gi"] = "Move to the last insertion and INSERT", | ||
["gv"] = "Switch to VISUAL using last selection", | ||
["gn"] = "Search forwards and select", | ||
["gN"] = "Search backwards and select", | ||
["g%"] = "Cycle backwards through results", | ||
}, | ||
} | ||
|
||
function M.setup(wk, config) | ||
for key, mappings in pairs(misc) do | ||
if config[key] ~= false then wk.register(mappings, { mode = "n", prefix = "" }) end | ||
end | ||
end | ||
|
||
return M |