Fix ctrl-p in Git
This commit is contained in:
committed by
greg-compass
parent
173b24844d
commit
d5b2f46a55
+2
-4
@@ -77,6 +77,7 @@ in
|
|||||||
"<C-k>" = ''"<C-w>k<C-w><CR>"'';
|
"<C-k>" = ''"<C-w>k<C-w><CR>"'';
|
||||||
"<C-h>" = ''"<C-w>h<C-w><CR>"'';
|
"<C-h>" = ''"<C-w>h<C-w><CR>"'';
|
||||||
"<C-l>" = ''"<C-w>l<C-w><CR>"'';
|
"<C-l>" = ''"<C-w>l<C-w><CR>"'';
|
||||||
|
"<C-o>" = ''":GFiles?<CR>"'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
plugins = {
|
plugins = {
|
||||||
@@ -88,7 +89,7 @@ in
|
|||||||
fugitive.enable = true;
|
fugitive.enable = true;
|
||||||
notify.enable = true;
|
notify.enable = true;
|
||||||
};
|
};
|
||||||
extraConfigLua = builtins.readFile ./vim/extra.lua;
|
extraConfigLua = builtins.replaceStrings [ "@git@" ] [ "${pkgs.git}/bin/git" ] (builtins.readFile ./vim/extra.lua);
|
||||||
extraConfigVim = builtins.readFile ./vim/extra.vimrc;
|
extraConfigVim = builtins.readFile ./vim/extra.vimrc;
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
bufexplorer
|
bufexplorer
|
||||||
@@ -97,14 +98,11 @@ in
|
|||||||
nvim-cmp
|
nvim-cmp
|
||||||
packer-nvim
|
packer-nvim
|
||||||
|
|
||||||
#jedi-vim
|
|
||||||
|
|
||||||
context-vim
|
context-vim
|
||||||
direnv-vim
|
direnv-vim
|
||||||
fzf-vim
|
fzf-vim
|
||||||
vim-flake8
|
vim-flake8
|
||||||
vim-indent-guides
|
vim-indent-guides
|
||||||
vim-rooter
|
|
||||||
vim-xonsh
|
vim-xonsh
|
||||||
];
|
];
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
|
|||||||
@@ -35,10 +35,3 @@ api.nvim_create_autocmd({ "BufRead", "BufNewFile"}, {
|
|||||||
pattern = "Vagrantfile*",
|
pattern = "Vagrantfile*",
|
||||||
command = "set filetype=ruby"
|
command = "set filetype=ruby"
|
||||||
})
|
})
|
||||||
|
|
||||||
if api.nvim_command_output("!git rev-parse --is-inside-work-tree") == true then
|
|
||||||
vim.keymap.set(all, "<C-p>", ":GFiles --cached --others --exclude-standard<CR>")
|
|
||||||
vim.keymap.set(all, "<C-o>", ":GFiles?<CR>")
|
|
||||||
else
|
|
||||||
vim.keymap.set(all, "<C-p>", ":Files<CR>")
|
|
||||||
end
|
|
||||||
|
|||||||
@@ -31,3 +31,5 @@ endfunction
|
|||||||
command! -nargs=? -range=% Space2Tab call IndentConvert(<line1>,<line2>,0,<q-args>)
|
command! -nargs=? -range=% Space2Tab call IndentConvert(<line1>,<line2>,0,<q-args>)
|
||||||
command! -nargs=? -range=% Tab2Space call IndentConvert(<line1>,<line2>,1,<q-args>)
|
command! -nargs=? -range=% Tab2Space call IndentConvert(<line1>,<line2>,1,<q-args>)
|
||||||
command! -nargs=? -range=% RetabIndent call IndentConvert(<line1>,<line2>,&et,<q-args>)
|
command! -nargs=? -range=% RetabIndent call IndentConvert(<line1>,<line2>,&et,<q-args>)
|
||||||
|
|
||||||
|
noremap <expr> <C-p> (fugitive#Head() != '' ? ':GFiles --exclude-standard --others --cached' : ':Files')."\<cr>"
|
||||||
|
|||||||
Reference in New Issue
Block a user