From c19a9a5705ac18b847b88a85c18f0b34a6a03684 Mon Sep 17 00:00:00 2001 From: Anish L Date: Sat, 26 Feb 2022 01:58:16 +1000 Subject: [PATCH] switch tabbing on common, add some more things to nvim --- profiles/core/common.nix | 140 +++++++++++++++++++-------------------- profiles/nvim/nvim.nix | 26 +++++++- 2 files changed, 95 insertions(+), 71 deletions(-) diff --git a/profiles/core/common.nix b/profiles/core/common.nix index 5b1d64a5..e7ea3d00 100644 --- a/profiles/core/common.nix +++ b/profiles/core/common.nix @@ -1,10 +1,10 @@ { config, pkgs, ... }: { -# imports = [ +# imports = [ # ./nvim.nix -# ./unstable.nix -# ]; +# ./unstable.nix +# ]; environment.systemPackages = with pkgs; [ @@ -12,111 +12,111 @@ iftop wget curl - exa - bat - fd - ag - viu - w3m - ranger - ripgrep + exa + bat + fd + ag + viu + w3m + ranger + ripgrep tcpdump whois mtr file lsof - atool + atool inotify-tools - strace + strace zip unzip rsync tmux pwgen - glow + glow gitAndTools.gitFull - dig - wpa_supplicant - #neovim defined in ./nvim.nix - #wofi + dig + wpa_supplicant + #neovim defined in ./nvim.nix + #wofi #firefox #fractal - #pinentry_gnome + #pinentry_gnome pass gcc less mpv zathura - #qmk_firmware + #qmk_firmware python3 - gdb - #vcv-rack - #xdotool - #neofetch - #calibre + gdb + #vcv-rack + #xdotool + #neofetch + #calibre #openvpn - #gimp - xxd - #tilix - kitty + #gimp + xxd + #tilix + kitty taskwarrior gnupg - #openjdk - #glslviewer - #filezilla + #openjdk + #glslviewer + #filezilla #signal-desktop - #wire-desktop + #wire-desktop #tdesktop #feedreader - #newsflash - #syncthing - dijo - #kdeconnect - #ssb-patchwork - #gnome3.gnome-tweaks - #gnome3.pomodoro + #newsflash + #syncthing + dijo + #kdeconnect + #ssb-patchwork + #gnome3.gnome-tweaks + #gnome3.pomodoro #gnomeExtensions.gsconnect #gnomeExtensions.taskwhisperer - #gnome3.networkmanager-openvpn + #gnome3.networkmanager-openvpn #python3Packages.youtube-dl - #appimage-run - #home-manager + #appimage-run + #home-manager libreoffice fontconfig - #hugo - #processing - #nextcloud-client - #zsh-powerlevel10k - powerline-fonts - #supercollider - haskellPackages.tidal - pandoc + #hugo + #processing + #nextcloud-client + #zsh-powerlevel10k + powerline-fonts + #supercollider + haskellPackages.tidal + pandoc ]; - #programs.bash.enableCompletion = true; - environment.shellAliases = { - "cat": "bat"; - "ls":"exa"; - "grep": "rg"; - }; + #programs.bash.enableCompletion = true; + environment.shellAliases = { + "cat": "bat"; + "ls":"exa"; + "grep": "rg"; + }; # needed for vcv-rack - #nixpkgs.config.allowUnfree = true; - programs.gnupg.agent.enable = true; - programs.gnupg.agent.pinentryFlavor = "curses"; - programs.gnupg.agent.enableSSHSupport = false; + #nixpkgs.config.allowUnfree = true; + programs.gnupg.agent.enable = true; + programs.gnupg.agent.pinentryFlavor = "curses"; + programs.gnupg.agent.enableSSHSupport = false; - #system.copySystemConfiguration = true; - #services.syncthing = { - # enable = true; + #system.copySystemConfiguration = true; + #services.syncthing = { + # enable = true; # openDefaultPorts = true; # systemService = true; - # user = "anish"; + # user = "anish"; # dataDir = "/home/anish/usr/syncthing"; #}; #zsh powerlevel10k - #programs.zsh.enable = true; + #programs.zsh.enable = true; #programs.zsh.promptInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; #users.users.anish.shell = pkgs.zsh; @@ -124,9 +124,9 @@ programs.adb.enable = true; users.users.anish.extraGroups = ["adbusers"]; - nix.extraOptions = '' - keep-outputs = true - keep-derivations = true - ''; + nix.extraOptions = '' + keep-outputs = true + keep-derivations = true + ''; } diff --git a/profiles/nvim/nvim.nix b/profiles/nvim/nvim.nix index baa85365..a96514f9 100644 --- a/profiles/nvim/nvim.nix +++ b/profiles/nvim/nvim.nix @@ -192,15 +192,39 @@ in map q :wq map r :RainbowParenthesesToggleAll map :noh + nnoremap Y y$ + " center moving + nnoremap n nzzzv + nnoremap N Nzzzv + nnoremap J mzJ'z + " undo points + inoremap , ,u + inoremap . .u + inoremap ! !u + inoremap ? ?u + inoremap ( (u + inoremap ) )u + inoremap [ [u + inoremap ] ]u + inoremap { {u + inoremap } }u + " moving text + vnoremap J :m '>+1gv=gv + vnoremap K :m '>-2gv=gv + inoremap :m .+1== + inoremap :m .-2== + nnoremap j :m .+1== + nnoremap k :m .-2== " git nmap gd :SignifyDiff map ghu :SignifyHunkUndo nmap gl :SignifyList + nnoremap ga :G fetch --all nmap gs :G nmap gh :diffget //3 nmap gl :diffget //2 - nmap gc :GChecout + nmap gc :GCheckout " kitaab map zs :ZettelSearch