✨ Added vim-fugitive and harpoon to nvim config
This commit is contained in:
parent
1aa13410f3
commit
25c98539b9
22 changed files with 449 additions and 384 deletions
|
|
@ -1,4 +1,5 @@
|
|||
-- vim.opt.guicursor = ""
|
||||
-- fat cursor no matter what
|
||||
vim.opt.guicursor = ""
|
||||
--
|
||||
vim.opt.nu = true
|
||||
vim.opt.relativenumber = true
|
||||
|
|
@ -21,11 +22,11 @@ vim.opt.termguicolors = true
|
|||
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.isfname:append("@-@")
|
||||
--vim.opt.isfname:append("@-@")
|
||||
|
||||
vim.opt.updatetime = 50
|
||||
|
||||
vim.opt.mouse = 'a'
|
||||
vim.opt.mouse = "a"
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.smarttab = true
|
||||
vim.opt.ignorecase = true
|
||||
|
|
@ -39,37 +40,37 @@ vim.opt.splitbelow = true
|
|||
vim.opt.splitright = true
|
||||
|
||||
-- Removes trailing spaces
|
||||
vim.cmd[[function TrimWhiteSpace()
|
||||
vim.cmd([[function TrimWhiteSpace()
|
||||
%s/\s*$//
|
||||
''
|
||||
endfunction]]
|
||||
endfunction]])
|
||||
--Removes trailing spaces on save
|
||||
vim.cmd[[autocmd FileWritePre * call TrimWhiteSpace()]]
|
||||
vim.cmd[[autocmd FileAppendPre * call TrimWhiteSpace()]]
|
||||
vim.cmd[[autocmd FilterWritePre * call TrimWhiteSpace()]]
|
||||
vim.cmd[[autocmd BufWritePre * call TrimWhiteSpace()]]
|
||||
vim.cmd([[autocmd FileWritePre * call TrimWhiteSpace()]])
|
||||
vim.cmd([[autocmd FileAppendPre * call TrimWhiteSpace()]])
|
||||
vim.cmd([[autocmd FilterWritePre * call TrimWhiteSpace()]])
|
||||
vim.cmd([[autocmd BufWritePre * call TrimWhiteSpace()]])
|
||||
|
||||
-- Marks end of line, space, and trailing space characters
|
||||
vim.opt.listchars:append({ eol = '↵', trail = '·', space = '·' })
|
||||
vim.opt.listchars:append({ eol = "↵", trail = "·", space = "·" })
|
||||
vim.opt.list = true
|
||||
|
||||
-- git-blame disabled by default
|
||||
vim.g.gitblame_enabled = 0
|
||||
|
||||
-- vertically center document when entering Insert mode
|
||||
vim.cmd[[autocmd InsertEnter * norm zz]]
|
||||
vim.cmd([[autocmd InsertEnter * norm zz]])
|
||||
|
||||
-- enable clipboard
|
||||
vim.cmd[[set clipboard+=unnamedplus]]
|
||||
vim.cmd([[set clipboard+=unnamedplus]])
|
||||
|
||||
-- enable hard/soft wrap
|
||||
vim.cmd[[set wrap linebreak textwidth=80]]
|
||||
vim.cmd([[set wrap linebreak textwidth=80]])
|
||||
|
||||
-- max tab characters
|
||||
vim.cmd[[let g:mintabline_tab_max_chars = 10 ]]
|
||||
vim.cmd([[let g:mintabline_tab_max_chars = 10 ]])
|
||||
|
||||
-- Search pattern across repository files using fzf
|
||||
vim.cmd[[
|
||||
vim.cmd([[
|
||||
function! FzfExplore(...)
|
||||
let inpath = substitute(a:1, "'", '', 'g')
|
||||
if inpath == "" || matchend(inpath, '/') == strlen(inpath)
|
||||
|
|
@ -80,11 +81,9 @@ else
|
|||
let file = getcwd() . '/' . inpath
|
||||
execute "e" file
|
||||
endif
|
||||
endfunction]]
|
||||
endfunction]])
|
||||
|
||||
vim.cmd[[command! -nargs=* FZFExplore call FzfExplore(shellescape(<q-args>))]]
|
||||
vim.cmd([[command! -nargs=* FZFExplore call FzfExplore(shellescape(<q-args>))]])
|
||||
|
||||
-- fzf is on bottom of screen
|
||||
vim.cmd[[let g:fzf_layout = { 'down': '~30%' }]]
|
||||
|
||||
|
||||
vim.cmd([[let g:fzf_layout = { 'down': '~30%' }]])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue