|
@ -24,6 +24,11 @@ if !exists('g:vscode') |
|
|
Plug 'nvim-telescope/telescope.nvim', Cond(!exists('g:vscode')) |
|
|
Plug 'nvim-telescope/telescope.nvim', Cond(!exists('g:vscode')) |
|
|
Plug 'nvim-telescope/telescope-fzy-native.nvim', Cond(!exists('g:vscode')) |
|
|
Plug 'nvim-telescope/telescope-fzy-native.nvim', Cond(!exists('g:vscode')) |
|
|
|
|
|
|
|
|
|
|
|
Plug 'Rican7/php-doc-modded' |
|
|
|
|
|
|
|
|
|
|
|
Plug 'udalov/kotlin-vim' |
|
|
|
|
|
Plug 'f-person/git-blame.nvim' |
|
|
|
|
|
|
|
|
Plug 'vimwiki/vimwiki', Cond(!exists('g:vscode')) |
|
|
Plug 'vimwiki/vimwiki', Cond(!exists('g:vscode')) |
|
|
|
|
|
|
|
|
Plug 'ap/vim-css-color', Cond(!exists('g:vscode')) |
|
|
Plug 'ap/vim-css-color', Cond(!exists('g:vscode')) |
|
@ -41,6 +46,7 @@ set nohlsearch |
|
|
set incsearch |
|
|
set incsearch |
|
|
set ignorecase |
|
|
set ignorecase |
|
|
|
|
|
|
|
|
|
|
|
autocmd BufWritePre * :%s/\s\+$//e |
|
|
|
|
|
|
|
|
if !exists('g:vscode') |
|
|
if !exists('g:vscode') |
|
|
set go=a |
|
|
set go=a |
|
@ -60,10 +66,26 @@ if !exists('g:vscode') |
|
|
set encoding=utf-8 |
|
|
set encoding=utf-8 |
|
|
set number relativenumber |
|
|
set number relativenumber |
|
|
|
|
|
|
|
|
|
|
|
nnoremap <leader>vs :vsplit<Enter> |
|
|
|
|
|
nnoremap <leader>hs :split<Enter> |
|
|
|
|
|
|
|
|
" Tab 2 spaces |
|
|
" Tab 2 spaces |
|
|
filetype plugin indent on |
|
|
filetype plugin indent on |
|
|
set tabstop=4 softtabstop=4 expandtab shiftwidth=4 smarttab |
|
|
set tabstop=4 softtabstop=4 expandtab shiftwidth=4 smarttab |
|
|
|
|
|
|
|
|
|
|
|
let g:tabStop=4 |
|
|
|
|
|
function! ToggleTabWidth() |
|
|
|
|
|
if g:tabStop == 2 |
|
|
|
|
|
set tabstop=4 softtabstop=4 expandtab shiftwidth=4 smarttab |
|
|
|
|
|
let g:tabStop=4 |
|
|
|
|
|
else |
|
|
|
|
|
set tabstop=2 softtabstop=2 expandtab shiftwidth=2 smarttab |
|
|
|
|
|
let g:tabStop=2 |
|
|
|
|
|
endif |
|
|
|
|
|
endfunction |
|
|
|
|
|
|
|
|
|
|
|
nnoremap <leader>t :call ToggleTabWidth()<CR> |
|
|
|
|
|
|
|
|
" Disables automatic commenting on newline: |
|
|
" Disables automatic commenting on newline: |
|
|
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o |
|
|
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o |
|
|
|
|
|
|
|
@ -77,6 +99,24 @@ if !exists('g:vscode') |
|
|
" Set gohtml template files to html syntax |
|
|
" Set gohtml template files to html syntax |
|
|
autocmd BufNewFile,BufRead *.gohtml set syntax=html |
|
|
autocmd BufNewFile,BufRead *.gohtml set syntax=html |
|
|
|
|
|
|
|
|
|
|
|
" Automatically save the current session whenever vim is closed |
|
|
|
|
|
autocmd VimLeave * mksession! ~/.config/nvim/session/shutdown_session.vim |
|
|
|
|
|
|
|
|
|
|
|
" <F7> restores that 'shutdown session' |
|
|
|
|
|
noremap <F7> :source ~/.config/nvim/session/shutdown_session.vim<CR> |
|
|
|
|
|
|
|
|
|
|
|
" If you really want to, this next line should restore the shutdown session |
|
|
|
|
|
" automatically, whenever you start vim. (Commented out for now, in case |
|
|
|
|
|
" somebody just copy/pastes this whole block) |
|
|
|
|
|
" |
|
|
|
|
|
" autocmd VimEnter source ~/.vim/shutdown_session.vim<CR> |
|
|
|
|
|
|
|
|
|
|
|
" manually save a session with <F5> |
|
|
|
|
|
noremap <F5> :mksession! ~/.config/nvim/session/manual_session.vim<cr> |
|
|
|
|
|
|
|
|
|
|
|
" recall the manually saved session with <F6> |
|
|
|
|
|
noremap <F6> :source ~/.config/nvim/session/manual_session.vim<cr> |
|
|
|
|
|
|
|
|
" NETRW |
|
|
" NETRW |
|
|
|
|
|
|
|
|
let g:netrw_liststyle = 3 |
|
|
let g:netrw_liststyle = 3 |
|
@ -91,7 +131,7 @@ if !exists('g:vscode') |
|
|
let i = bufnr("$") |
|
|
let i = bufnr("$") |
|
|
while (i >= 1) |
|
|
while (i >= 1) |
|
|
if (getbufvar(i, "&filetype") == "netrw") |
|
|
if (getbufvar(i, "&filetype") == "netrw") |
|
|
silent exe "bwipeout " . i |
|
|
|
|
|
|
|
|
silent exe "bwipeout " . i |
|
|
endif |
|
|
endif |
|
|
let i-=1 |
|
|
let i-=1 |
|
|
endwhile |
|
|
endwhile |
|
@ -135,12 +175,32 @@ if !exists('g:vscode') |
|
|
" Telescope remaps |
|
|
" Telescope remaps |
|
|
lua require("telescope") |
|
|
lua require("telescope") |
|
|
|
|
|
|
|
|
nnoremap <leader>gs :lua require('telescope.builtin').grep_string({ search = vim.fn.input("Grep For > ")})<CR> |
|
|
|
|
|
nnoremap <C-q> :lua require('telescope.builtin').git_files()<CR> |
|
|
|
|
|
nnoremap <C-a> :lua require('telescope.builtin').find_files()<CR> |
|
|
|
|
|
|
|
|
nnoremap <C-g> :lua require('telescope.builtin').grep_string({ search = vim.fn.input("Grep For > ")})<CR> |
|
|
|
|
|
nnoremap <C-p> :lua require('telescope.builtin').git_files()<CR> |
|
|
|
|
|
nnoremap <C-q> :lua require('telescope.builtin').find_files()<CR> |
|
|
|
|
|
|
|
|
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr> |
|
|
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" PHP Doc |
|
|
|
|
|
|
|
|
|
|
|
nnoremap <leader>h :call UpdatePhpDocIfExists()<CR> |
|
|
|
|
|
function! UpdatePhpDocIfExists() |
|
|
|
|
|
normal! k |
|
|
|
|
|
if getline('.') =~ '/' |
|
|
|
|
|
normal! V%d |
|
|
|
|
|
else |
|
|
|
|
|
normal! j |
|
|
|
|
|
endif |
|
|
|
|
|
call PhpDocSingle() |
|
|
|
|
|
normal! k^%k$ |
|
|
|
|
|
if getline('.') =~ ';' |
|
|
|
|
|
exe "normal! $svoid" |
|
|
|
|
|
endif |
|
|
|
|
|
endfunction |
|
|
|
|
|
|
|
|
|
|
|
nnoremap <C-D> :call UpdatePhpDocIfExists()<CR> |
|
|
|
|
|
|
|
|
" VimWiki |
|
|
" VimWiki |
|
|
|
|
|
|
|
|
let pentest_wiki = {} |
|
|
let pentest_wiki = {} |
|
@ -172,4 +232,9 @@ if !exists('g:vscode') |
|
|
vnoremap <leader><leader> <Esc>/<++><Enter>"_c4l |
|
|
vnoremap <leader><leader> <Esc>/<++><Enter>"_c4l |
|
|
map <leader><leader> <Esc>/<++><Enter>"_c4l |
|
|
map <leader><leader> <Esc>/<++><Enter>"_c4l |
|
|
|
|
|
|
|
|
|
|
|
augroup twig_ft |
|
|
|
|
|
au! |
|
|
|
|
|
autocmd BufNewFile,BufRead *.docker set syntax=dockerfile |
|
|
|
|
|
augroup END |
|
|
|
|
|
|
|
|
endif |
|
|
endif |