add mappings to spawn nobufflisted terms
This commit is contained in:
parent
4ca8d781cf
commit
63d54926a4
@ -196,10 +196,15 @@ M.mappings = {
|
|||||||
-- show & recover hidden terminal buffers in a telescope picker
|
-- show & recover hidden terminal buffers in a telescope picker
|
||||||
pick_term = "<leader>W",
|
pick_term = "<leader>W",
|
||||||
|
|
||||||
-- spawn terminals
|
-- spawn a single terminal and toggle it
|
||||||
|
-- this just works like toggleterm kinda
|
||||||
new_horizontal = "<leader>h",
|
new_horizontal = "<leader>h",
|
||||||
new_vertical = "<leader>v",
|
new_vertical = "<leader>v",
|
||||||
new_window = "<leader>w",
|
|
||||||
|
-- spawn new terminals
|
||||||
|
spawn_horizontal = "<leader>H",
|
||||||
|
spawn_vertical = "<leader>V",
|
||||||
|
spawn_window = "<leader>w",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,8 +33,8 @@ M.misc = function()
|
|||||||
-- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/
|
-- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/
|
||||||
-- empty mode is same as using :map
|
-- empty mode is same as using :map
|
||||||
-- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour
|
-- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour
|
||||||
map_wrapper({"n", "x", "o"}, "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true })
|
map_wrapper({ "n", "x", "o" }, "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true })
|
||||||
map_wrapper({"n", "x", "o"}, "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true })
|
map_wrapper({ "n", "x", "o" }, "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true })
|
||||||
map_wrapper("", "<Down>", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true })
|
map_wrapper("", "<Down>", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true })
|
||||||
map_wrapper("", "<Up>", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true })
|
map_wrapper("", "<Up>", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true })
|
||||||
|
|
||||||
@ -115,7 +115,16 @@ M.misc = function()
|
|||||||
.. tostring(terminal_options.window.vsplit_width)
|
.. tostring(terminal_options.window.vsplit_width)
|
||||||
.. ")<CR>"
|
.. ")<CR>"
|
||||||
)
|
)
|
||||||
--map("n", term_maps.new_window, "") not supported yet
|
|
||||||
|
-- spawns terminals
|
||||||
|
map(
|
||||||
|
"n",
|
||||||
|
term_maps.spawn_horizontal,
|
||||||
|
":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert <CR>"
|
||||||
|
)
|
||||||
|
map("n", term_maps.spawn_vertical, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert <CR>")
|
||||||
|
map("n", term_maps.new_window, ":execute 'terminal' | let b:term_type = 'wind' | startinsert <CR>")
|
||||||
|
|
||||||
-- terminal mappings end --
|
-- terminal mappings end --
|
||||||
|
|
||||||
-- Add Packer commands because we are not loading it at startup
|
-- Add Packer commands because we are not loading it at startup
|
||||||
|
Loading…
Reference in New Issue
Block a user