From 24979fc93e6734ca9fc74cc05098d3c0f94ea700 Mon Sep 17 00:00:00 2001 From: David Aizenberg Date: Fri, 17 Jun 2022 13:35:31 +0100 Subject: [PATCH] sync --- .bashrc | 5 +++-- .vimrc | 70 ++++++++++++++++----------------------------------------- 2 files changed, 22 insertions(+), 53 deletions(-) diff --git a/.bashrc b/.bashrc index fada3be..20ca28c 100644 --- a/.bashrc +++ b/.bashrc @@ -7,8 +7,9 @@ #Exports -EDITOR=vim +EDITOR=nvim +alias vim='nvim' getCurrentSKMKey() { if ! command -v skm &> /dev/null @@ -88,7 +89,7 @@ curl -4 http://wttr.in/$1 # Idea taken from: https://news.ycombinator.com/item?id=17064520 lb() { - vim ~/Dropbox/logbooks/$(date '+%d-%m-%Y').md + vim ~/Dropbox/logbooks/$(date '+%Y-%m-%d').md } # Get IP (call with myip) diff --git a/.vimrc b/.vimrc index 01c964a..e3e741c 100644 --- a/.vimrc +++ b/.vimrc @@ -4,38 +4,37 @@ " # david.aizenberg@paranoici.org# " ################################ -" #Requirements: Pathogen, Airline, NERDTree, Mustang colour theme - " put this line first in ~/.vimrc set nocompatible | filetype indent plugin on | syn on - -set runtimepath^=~/.vim/bundle/ctrlp.vim let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard'] +let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git' +let g:tpipeline_statusline = '%!tpipeline#stl#line()' set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() -" let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' +Plugin 'neoclide/coc.nvim' Plugin 'preservim/nerdtree' Plugin 'nathanaelkane/vim-indent-guides' +"Plugin 'nvim-lualine/lualine.nvim' +Plugin 'kyazdani42/nvim-web-devicons' Plugin 'Xuyuanp/nerdtree-git-plugin' -Plugin 'ryanoasis/vim-devicons' -Plugin 'Raimondi/delimitMate' -Plugin 'digitaltoad/vim-pug' +Plugin 'vim-airline/vim-airline' +" Plugin 'ryanoasis/vim-devicons' +"Plugin 'Raimondi/delimitMate' Plugin 'ekalinin/Dockerfile.vim' -Plugin 'godlygeek/tabular' +" Plugin 'godlygeek/tabular' Plugin 'airblade/vim-gitgutter' Plugin 'tpope/vim-fugitive' -Plugin 'vim-airline/vim-airline' -Plugin 'vimwiki/vimwiki' -Plugin 'dNitro/vim-pug-complete' -Plugin 'othree/html5.vim' +" Plugin 'vimwiki/vimwiki' +Plugin 'ctrlpvim/ctrlp.vim' call vundle#end() -imap O +let g:copilot_assume_mapped = v:true +imap O " This does what it says on the tin. It will check your file on open too, not " just on save. @@ -50,17 +49,12 @@ set completeopt-=preview let g:syntastic_error_symbol = '✘' let g:syntastic_warning_symbol = "▲" - " Turn syntax highlight on. syntax on "for future use. let mapleader = "," -"Enable Airline -set laststatus=2 -let g:airline_powerline_fonts = 1 - "autocmd VimEnter * NERDTree "bind Ctrl + E as a Toggle for NERDTree @@ -103,35 +97,6 @@ set autoindent " set the cursor at same indent as line above set smartindent " try to be smart about indenting (C-style) set noexpandtab -" use blowfish for file encryption -set cm=blowfish - -" vimwiki -set nocompatible -filetype plugin on -" vimwiki stuff " -" Run multiple wikis " -let g:vimwiki_list = [ - \{'path': '~/b2_sync/Wiki/personal.wiki'}, - \{'path': '~/b2_sync/Wiki/tech.wiki'} - \] -au BufRead,BufNewFile *.wiki set filetype=vimwiki -autocmd FileType vimwiki map :VimwikiMakeDiaryNote -function! ToggleCalendar() - execute ":Calendar" - if exists("g:calendar_open") - if g:calendar_open == 1 - execute "q" - unlet g:calendar_open - else - g:calendar_open = 1 - end - else - let g:calendar_open = 1 - end -endfunction -autocmd FileType vimwiki map c :call ToggleCalendar() - " ############################### " # Language Dependent settings # " ############################### @@ -142,6 +107,8 @@ autocmd FileType sh setlocal expandtab shiftwidth=4 tabstop=8 softtabstop=4 " Python autocmd FileType python setlocal tabstop=1 shiftwidth=1 expandtab number +autocmd FileType python map :w:exec '!python3' shellescape(@%, 1) + " Ruby autocmd FileType ruby setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2 @@ -154,6 +121,8 @@ autocmd FileType html,xhtml,xml setlocal expandtab shiftwidth=2 tabstop=2 softta " JS autocmd FileType javascript setlocal equalprg=js-beautify\ --stdin +autocmd FileType javascript map :w:exec '!node' shellescape(@%, 1) + " CSS autocmd FileType css setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4 @@ -175,7 +144,6 @@ set autoindent " Set 256 colour mode and Theme. set t_Co=256 -" colorscheme mustang -colorscheme desert - +colorscheme mustang +" colorscheme desert