feat: fish config?
This commit is contained in:
parent
30940be41e
commit
b091a87904
7
dotfiles/fish/config.fish
Normal file
7
dotfiles/fish/config.fish
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Make normal mode the default
|
||||||
|
set vi_mode_default vi_mode_normal
|
||||||
|
|
||||||
|
function vi_mode_user_key_bindings
|
||||||
|
echo "Added keybinds (hopefully)"
|
||||||
|
bind jj 'commandline -f backward-char; vi_mode_normal'
|
||||||
|
end
|
|
@ -16,3 +16,20 @@ bind -n m-h select-pane -L
|
||||||
bind -n m-l select-pane -R
|
bind -n m-l select-pane -R
|
||||||
bind -n m-k select-pane -U
|
bind -n m-k select-pane -U
|
||||||
bind -n m-j select-pane -D
|
bind -n m-j select-pane -D
|
||||||
|
|
||||||
|
# Vim-mode
|
||||||
|
set-window-option -g mode-keys vi
|
||||||
|
|
||||||
|
# Vim like keybinds for copying
|
||||||
|
bind -t vi-copy v begin-selection # begin selection
|
||||||
|
bind -t vi-copy V rectangle-toggle # square selection (?)
|
||||||
|
|
||||||
|
bind -t vi-copy y copy-pipe 'xclip -in -set clipboard' # copy
|
||||||
|
|
||||||
|
unbind p
|
||||||
|
bind p run "tmux set-buffer \"$(xclip -o -set clipboard)\"; tmux paste-buffer" # paste
|
||||||
|
|
||||||
|
# Vim like mode for leaving insert mode
|
||||||
|
unbind [ # unbind the default way to copy text
|
||||||
|
bind Escape copy-mode # allow exiting insert mode with Escape
|
||||||
|
bind jj copy-mode # allow exiting insert mode with jj (?)
|
||||||
|
|
17
flake.lock
17
flake.lock
|
@ -48,6 +48,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"fish-plugin-vi-mode": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1613331590,
|
||||||
|
"narHash": "sha256-kRYWbTVT+eV5t5ZvV8abL2zIUnOZMbc2Gk+hDhX6hPM=",
|
||||||
|
"owner": "oh-my-fish",
|
||||||
|
"repo": "plugin-vi-mode",
|
||||||
|
"rev": "2655a7253077faefd2f0a57b799dee687344d4fb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oh-my-fish",
|
||||||
|
"repo": "plugin-vi-mode",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -261,6 +277,7 @@
|
||||||
"agnoster": "agnoster",
|
"agnoster": "agnoster",
|
||||||
"easy-dhall-nix": "easy-dhall-nix",
|
"easy-dhall-nix": "easy-dhall-nix",
|
||||||
"easy-purescript-nix": "easy-purescript-nix",
|
"easy-purescript-nix": "easy-purescript-nix",
|
||||||
|
"fish-plugin-vi-mode": "fish-plugin-vi-mode",
|
||||||
"githubNvimTheme": "githubNvimTheme",
|
"githubNvimTheme": "githubNvimTheme",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||||
|
|
|
@ -35,6 +35,11 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fish-plugin-vi-mode = {
|
||||||
|
url = "github:oh-my-fish/plugin-vi-mode";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
agnoster = {
|
agnoster = {
|
||||||
url = "github:oh-my-fish/theme-agnoster";
|
url = "github:oh-my-fish/theme-agnoster";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
|
|
@ -2,11 +2,16 @@
|
||||||
let
|
let
|
||||||
shellAliases = import ./aliases.nix;
|
shellAliases = import ./aliases.nix;
|
||||||
common = import ./common.nix;
|
common = import ./common.nix;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
home-manager.users.adrielus.programs.fish = {
|
home-manager.users.adrielus.programs.fish = {
|
||||||
inherit shellAliases;
|
inherit shellAliases;
|
||||||
shellInit = common.shellInit;
|
|
||||||
plugins = with pkgs; [ z agnoster ];
|
shellInit = ''
|
||||||
|
source ${../../../dotfiles/fish/fish.conf}
|
||||||
|
'' ++ common.shellInit;
|
||||||
|
|
||||||
|
plugins = with pkgs; [ myFishPlugins.z myFishPlugins.vi-mode myFishPlugins.themes.agnoster ];
|
||||||
|
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
, easy-purescript-nix
|
, easy-purescript-nix
|
||||||
, easy-dhall-nix
|
, easy-dhall-nix
|
||||||
, z
|
, z
|
||||||
|
, fish-plugin-vi-mode
|
||||||
, agnoster
|
, agnoster
|
||||||
, githubNvimTheme
|
, githubNvimTheme
|
||||||
, vim-extra-plugins
|
, vim-extra-plugins
|
||||||
|
@ -28,15 +29,25 @@ in
|
||||||
easy-purescript-nix = self.callPackage easy-purescript-nix { };
|
easy-purescript-nix = self.callPackage easy-purescript-nix { };
|
||||||
easy-dhall-nix = self.callPackage easy-dhall-nix { };
|
easy-dhall-nix = self.callPackage easy-dhall-nix { };
|
||||||
|
|
||||||
|
myFishPlugins = {
|
||||||
z = {
|
z = {
|
||||||
src = z;
|
src = z;
|
||||||
name = "z";
|
name = "z";
|
||||||
};
|
};
|
||||||
|
vi-mode = {
|
||||||
|
src = fish-plugin-vi-mode;
|
||||||
|
name = "vi-mode";
|
||||||
|
};
|
||||||
|
|
||||||
|
themes = {
|
||||||
agnoster = {
|
agnoster = {
|
||||||
src = agnoster;
|
src = agnoster;
|
||||||
name = "agnoster";
|
name = "agnoster";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
githubNvimTheme = githubNvimTheme;
|
githubNvimTheme = githubNvimTheme;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue