commit f1003c8b80f415fc6c2416003f78463f5f5e8697
parent 610365026931874b3149a40a343c86b1f057bf06
Author: Benjamin Paul <bpaul848@gmail.com>
Date: Mon, 26 Apr 2021 13:15:50 +1000
.
Diffstat:
5 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/home/neovim/default.nix b/home/neovim/default.nix
@@ -16,10 +16,14 @@
function lua()
${builtins.readFile ./lua.lua}
end
+ function tex()
+ ${builtins.readFile ./tex.lua}
+ end
EOF
au BufEnter *.c lua c()
au BufEnter *.cpp lua cpp()
au BufEnter *.lua lua lua()
+ au BufEnter *.tex lua tex()
'';
plugins = with pkgs.vimPlugins; [
{ plugin = vim-nix; }
diff --git a/home/neovim/init.lua b/home/neovim/init.lua
@@ -22,6 +22,9 @@ vim.o.expandtab = true
vim.o.autoindent = true
vim.o.smarttab = true
+-- Use Australian spelling
+vim.bo.spelllang = 'en_au'
+
-- Ruler shows the line and column number at the bottom right
vim.o.ruler = true
@@ -48,8 +51,11 @@ vim.api.nvim_set_keymap('n', '<leader>a', '$i',
-- Make leader+x delete char at the end of the line
vim.api.nvim_set_keymap('n', '<leader>x', '$x',
{ noremap = true, silent = true })
+-- Make leader+f fix the spelling of the current word
+vim.api.nvim_set_keymap('n', '<leader>f', '1z=',
+ { noremap = true, silent = true })
--- Make Shift-Delete do nothing (my keyboard is weird)
+-- Make Shift-Delete do nothing (my keyboard is weird so I press it a lot)
vim.api.nvim_set_keymap('i', '<S-Del>', '', { noremap = true, silent = true })
-- Colour column shows the text width of a file
diff --git a/home/neovim/tex.lua b/home/neovim/tex.lua
@@ -0,0 +1,6 @@
+-- latex ftplugin
+
+-- Bind <leader>+c to ci{ the last {} on the current line
+-- e.g. <leader>+c would make \command{ahesifuhisg} \command{} with insert
+vim.api.nvim_set_keymap('n', '<leader>c', '$bci{',
+ { noremap = true, silent = true })
diff --git a/home/zsh.nix b/home/zsh.nix
@@ -11,8 +11,6 @@ in
path = ".cache/zsh/history";
};
- # use auto-complete
-
# bind keys properly for backword or switch to vi mode??
shellAliases = {
@@ -36,9 +34,9 @@ in
TERMINAL = "alacritty";
};
- initExtra = ''
- . ~/.nix-profile/etc/profile.d/nix.sh
- '';
+# initExtra = ''
+# . ~/.nix-profile/etc/profile.d/nix.sh
+# '';
plugins = [
{
diff --git a/nixos/laptop/configuration.nix b/nixos/laptop/configuration.nix
@@ -27,7 +27,7 @@
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
- networking.hostName = "computer"; # Define your hostname.
+ networking.hostName = "laptop"; # Define your hostname.
#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true;