commit 7462972148b786884ca8054c05b44e95a0566aa3
parent 8a448d188682e357e770d6111123264995447bfd
Author: Bharatvaj <bharatvaj@yahoo.com>
Date: Mon, 7 Mar 2022 11:08:14 +0530
Don't source vim config for neovim
VIMINIT is getting used for both vim and neovim. We are just allowing
the config to load when 'nvim' is found.
Remove vim hard mode as I'm accustomed to hjkl. Removing it increases
startup time.
Note
init.lua is not loaded by neovim.
Diffstat:
5 files changed, 17 insertions(+), 28 deletions(-)
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
@@ -1,6 +1,8 @@
vim.g.mapleader = ' '
local set = vim.opt
+set.packpath="$XDG_DATA_HOME/nvim"
+
local map = require("utils").map
map("n", "<Leader>ww", ":w<CR>", { silent = true })
@@ -8,5 +10,10 @@ map("n", "<Leader>wq", ":wq<CR>", { silent = true })
map("n", "<Leader>qq", ":q<CR>", { silent = true })
map("n", "<CR>", ":noh<CR>", { silent = true })
-
set.tabstop=4
+set.exrc=false
+
+
+require'lspconfig'.pyright.setup{}
+
+set.shortmess="Iat"
diff --git a/.config/nvim/utils.lua b/.config/nvim/utils.lua
@@ -1,11 +0,0 @@
-local M = {}
-
-function M.map(mode, lhs, rhs, opts)
- local options = { noremap = true }
- if opts then
- options = vim.tbl_extend("force", options, opts)
- end
- vim.api.nvim_set_keymap(mode, lhs, rhs, options)
-end
-
-return M
diff --git a/.config/vim/keybindings/keybindings.vim b/.config/vim/keybindings/keybindings.vim
@@ -17,6 +17,9 @@ nnoremap <leader>qq :q<cr>
" Run Make
nnoremap <leader>bb :make<CR>
+" Generate ctags
+map <leader>c :!ctags -R -f ./.git/tags .<CR>
+
nnoremap <CR> :noh<CR><CR>:<backspace>
" Plugin keybindings
diff --git a/.config/vim/vimrc b/.config/vim/vimrc
@@ -25,10 +25,10 @@ augroup numbertoggle
augroup END
" General
-set mouse=a
+set mouse=
set nocursorline
syntax on
-set exrc
+set noexrc
set scrolloff=8
" Turn backup off
set nobackup
@@ -61,18 +61,6 @@ set shiftwidth=4
" Netrw customization
let g:netrw_banner = 0
-" Harder vim
-" Disable arrow keys
-for key in ['<Up>', '<Down>', '<Left>', '<Right>']
- exec 'noremap' key '<Nop>'
- exec 'inoremap' key '<Nop>'
- exec 'cnoremap' key '<Nop>'
-endfor
-" Disable h and l
-for key in ['h', 'l']
- exec 'noremap' key '<Nop>'
-endfor
-
" Visual Tweaks
hi VertSplit term=NONE cterm=NONE gui=NONE
diff --git a/.profile b/.profile
@@ -7,7 +7,9 @@ export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
# Global programs
-export VIMINIT="source $XDG_CONFIG_HOME/vim/vimrc"
+export VIMINIT="if !has('nvim')
+source $XDG_CONFIG_HOME/vim/vimrc
+endif"
export LESSHISTFILE=-
export LYNX_CFG="$XDG_CONFIG_HOME/lynx/lynx.cfg"
export LYNX_LSS="$XDG_CONFIG_HOME/lynx/lynx.lss"
@@ -57,7 +59,7 @@ export GEM_SPEC_CACHE="$XDG_CACHE_HOME"/gem
HISTTIMEFORMAT="%F %T "
# Local executables
-export PATH=${PATH}:~/.local/bin
+export PATH=${PATH}:${HOME}./local/bin:${XDG_DATA_HOME}/npm/bin
chance() {
# Hit or miss