Skip to content
This repository was archived by the owner on Jan 22, 2021. It is now read-only.

Commit

Permalink
Add indentLine. Use transparency. Confiure vue. Which key ongoing.
Browse files Browse the repository at this point in the history
  • Loading branch information
PasiBergman committed Jan 17, 2021
1 parent 01b81a0 commit e34db2c
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 33 deletions.
2 changes: 1 addition & 1 deletion ftplugin/cs.vim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nmap <silent> gd :OmniSharpGotoDefinition<CR>
nmap <silent> <Leader>gd :OmniSharpGotoDefinition<CR>
nnoremap <buffer> <Leader>fu :OmniSharpFindUsages<CR>
nnoremap <buffer> <Leader>fi :OmniSharpFindImplementations<CR>
nnoremap <buffer> <Leader>ca :OmniSharpGetCodeActions<CR>
Expand Down
4 changes: 4 additions & 0 deletions ftplugin/vue.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
" Vue specific settings
setlocal shiftwidth=2
setlocal tabstop=2
setlocal softtabstop=2 expandtab
6 changes: 3 additions & 3 deletions general/settings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ set t_Co=256 " Support 256 colors
set conceallevel=0 " So that I can see `` in markdown files
set laststatus=2 " Always display the status line
set cursorline " Enable highlighting of the current line
set textwidth=100 " Specify text width to 100 instead of old 80
set colorcolumn=+1 " Mark the column textwidth+1
" set textwidth=100 " Specify text width to 100 instead of old 80
" set colorcolumn=+1 " Mark the column textwidth+1
set background=dark " tell vim what the background color looks like
set showtabline=2 " Always show tabs
" set noshowmode " We don't need to see things like -- INSERT -- anymore
Expand All @@ -70,5 +70,5 @@ let loaded_netrwPlugin = 1
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o

" You can't stop me
cmap w!! w !sudo tee %
" cmap w!! w !sudo tee %

6 changes: 4 additions & 2 deletions init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@ source $HOME/.config/nvim/plug-config/vim-startify.vim
source $HOME/.config/nvim/plug-config/vim-fugitive.vim
source $HOME/.config/nvim/plug-config/fzf-checkout.vim
source $HOME/.config/nvim/plug-config/vim-floaterm.vim
source $HOME/.config/nvim/plug-config/vim-commentary.vim
" source $HOME/.config/nvim/plug-config/vim-commentary.vim
source $HOME/.config/nvim/plug-config/tcomment.vim
source $HOME/.config/nvim/plug-config/vimspector.vim
source $HOME/.config/nvim/plug-config/maximizer.vim
source $HOME/.config/nvim/plug-config/cheat.sh-vim.vim
" source $HOME/.config/nvim/plug-config/vim-vue-plugin.vim
source $HOME/.config/nvim/plug-config/vim-vue-plugin.vim
" Must be after theme selection
source $HOME/.config/nvim/plug-config/vim-hexokinase.vim
source $HOME/.config/nvim/plug-config/undotree.vim
source $HOME/.config/nvim/plug-config/indentLine.vim

source $HOME/.config/nvim/themes/vim-code-dark.vim
source $HOME/.config/nvim/themes/vim-airline.vim
Expand Down
17 changes: 8 additions & 9 deletions keys/cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,26 +92,27 @@ let g:vimspector_enable_mappings = 'VISUAL_STUDIO'

## Search

| Keymap | Mode | Usage |
| ------ | ---- | ------------------------------------------ |
| `noh` | N | Turn of search highlight until next search |
| `n` | N | Repeat searh forward |
| `N` | N | Repeat searh backword |
| Keymap | Mode | Usage |
| ------- | ---- | ------------------------------------------------ |
| `noh` | N | Turn of search highlight until next search |
| `n` | N | Repeat searh forward |
| `N` | N | Repeat searh backword |
| `#`/`*` | N | Search and highlight words matching below cursor |

## Sneak (justinmk/vim-sneak)

| Keymap | Mode | Usage |
| --------------- | ---- | ------------------------------------------------------------- |
| `s{char}{char}` | N | Activate search in text to jump forward to desired location. |
| `S{char}{char}` | N | Activate search in text to jump backward to desired location. |
| `S{char}{char}` | N | Activate search in text to jump backward to desired location. |
| `;` | N | Go to next match |
| `3;` | N | Skip to 3rd match from the current position. |
| `<Ctrl-o>` | N | Go back to the starting point. |
| `s<Enter>` | N | Repeat the last Sneak-search |
| `yszxy]` | N | Surround in brackets up to `xy>`. Sneak is the `z`. |
| `gUz\}` | N | Upper-case the text from the cursor until `\}` |
| | | |
| `cl` | N | Vim `s` (delete char and insert)remapped to `cl` |
| `cc` | N | Vim `S` (delete setence and insert)remapped to `cc` |

## Surround (tpope/vim-surround)

Expand All @@ -123,7 +124,6 @@ let g:vimspector_enable_mappings = 'VISUAL_STUDIO'
| `yss)` | N | Surround sentence with () |
| `S{to}` | V | In visual mode, surround selection with {to} |
| `ys{action}{to}` | N | Add {to} surrounds based on {action} |
| | | |

## Tabs

Expand Down Expand Up @@ -162,6 +162,5 @@ let g:vimspector_enable_mappings = 'VISUAL_STUDIO'
| `Ctrl-k` | N | Move to the window above (`Ctrl-w k`) |
| `Ctrl-l` | N | Move to the window on the right (`Ctrl-w l`) |
| `Ctrl-w o` | N | Only one window. 'This one' |
| `Ctrl-w =` | N | Make all windows/panes equal hheight & width |
| `<Leader>\|` | N | Split window to right (Which key mapping to `Ctrl-w v`) |
| `<Leader>-` | N | Split window to below (Which key mapping to `Ctrl-w s) |
23 changes: 11 additions & 12 deletions keys/which-key.vim
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,20 @@ let g:which_key_max_size = 0

" Hide status line
autocmd! FileType which_key

autocmd FileType which_key set laststatus=0 noshowmode noruler
\| autocmd BufLeave <buffer> set laststatus=2 noshowmode ruler


" Single mappings
" let g:which_key_map['/'] = [ ':call Comment()' , 'comment' ]
let g:which_key_map['.'] = [ ':e $MYVIMRC' , 'init.vim' ]
let g:which_key_map[';'] = [ ':Commands' , 'commands' ]
" let g:which_key_map['/'] = [ ':call Comment()' , 'comm'Reload init.vich_key_mapch_key_mapm'
let g:which_key_map[','] = [ ':so $MYVIMRC' , 'Reload init.vim' ]
let g:which_key_map[';'] = [ ':Commands' , 'commands' ]
let g:which_key_map['='] = [ '<C-W>=' , 'balance windows' ]
let g:which_key_map['-'] = [ '<C-W>s' , 'split below']
let g:which_key_map['|'] = [ '<C-W>v' , 'split right']
let g:which_key_map['e'] = [ ':CocCommand explorer --toggle' , 'explorer' ]
let g:which_key_map['f'] = [ '<Plug>easymotion-bd-f' , 'move to {char} ' ]
let g:which_key_map['-'] = [ '<C-W>s' , 'split below' ]
let g:which_key_map['|'] = [ '<C-W>v' , 'split right' ]
let g:which_key_map['e'] = [ ':CocCommand explorer --toggle' , 'explorer' ]
" let g:which_key_map['n'] = [ ':let @/ = ""' , 'no highlight' ]
" let g:which_key_map['o'] = [ ':RnvimrToggle' , 'open' ]
" let g:which_key_map['p'] = [ ':Files' , 'search files' ]
let g:which_key_map['q'] = [ '<Plug>(coc-fix-current)' , 'quickfix' ]
" let g:which_key_map['T'] = [ ':TSHighlightCapturesUnderCursor' , 'treesitter highlight' ]
Expand Down Expand Up @@ -104,7 +103,7 @@ let g:which_key_map['q'] = [ '<Plug>(coc-fix-current)' ,
" \ }

"" d is for debug
"let g:which_key_map.d = {
" let g:which_key_map.d = {
" \ 'name' : '+debug' ,
" \ 'b' : ['<Plug>VimspectorToggleBreakpoint' , 'breakpoint'],
" \ 'B' : ['<Plug>VimspectorToggleConditionalBreakpoint' , 'conditional breakpoint'],
Expand All @@ -119,9 +118,9 @@ let g:which_key_map['q'] = [ '<Plug>(coc-fix-current)' ,
" \ 'r' : ['<Plug>VimspectorRestart' , 'restart'],
" \ 's' : ['<Plug>VimspectorStop' , 'stop'],
" \ }

"" f is for find and replace
"let g:which_key_map.f = {
"
" " f is for find and replace
" let g:which_key_map.f = {
" \ 'name' : '+find & replace' ,
" \ 'f' : [':Farr --source=vimgrep' , 'file'],
" \ 'p' : [':Farr --source=rgnvim' , 'project'],
Expand Down
2 changes: 2 additions & 0 deletions plug-config/indentLine.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
let g:indentLine_color_gui = '#2a2a2a'
let g:indentLine_char = ''
11 changes: 11 additions & 0 deletions plug-config/vim-vue-plugin.vim
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
" https://github.com/leafOfTree/vim-vue-plugin
"
" Enable vim-vue-plugin
let g:vim_vue_plugin_load_full_syntax = 1
" Use TypeScript
let g:vim_vue_plugin_use_typescript = 1
" Use sass/scss
let g:vim_vue_plugin_use_sass = 1
" Highlight vue attribute value as expression instead of string.
let g:vim_vue_plugin_highlight_vue_attr = 1
" Highlight vue keyword like data, methods, ...
let g:vim_vue_plugin_highlight_vue_keyword = 1
9 changes: 5 additions & 4 deletions themes/vim-code-dark.vim
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ hi CocErrorFloat ctermbg=52 guibg=#FF3000
hi CursorLine ctermbg=52 guibg=#333333
hi CursorColumn ctermbg=52 guibg=#1F1F1F

" highlight Normal ctermbg=none
" highlight NonText ctermbg=none
" highlight Normal guibg=none
" highlight NonText guibg=none
" Transparency
highlight Normal ctermbg=none
highlight NonText ctermbg=none
highlight Normal guibg=none
highlight NonText guibg=none

" Cursorline only visible in the current (active) window
augroup CursorLine
Expand Down
6 changes: 4 additions & 2 deletions vim-plug/plugins.vim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ endif

call plug#begin('~/.config/nvim/autoload/plugged')
" Easier comments
Plug 'tpope/vim-commentary'
" Plug 'tpope/vim-commentary'
Plug 'tomtom/tcomment_vim'
" Remap . so that plugins can tap into it
Plug 'tpope/vim-repeat'

Expand Down Expand Up @@ -83,10 +84,11 @@ call plug#begin('~/.config/nvim/autoload/plugged')
" HTML/CSS live server
" Plug 'turbio/bracey.vim'
" Vue plugin
" Plug 'leafOfTree/vim-vue-plugin'
Plug 'leafOfTree/vim-vue-plugin'
" Cheatsheet (https://cht.sh) integration
Plug 'dbeniamine/cheat.sh-vim'
Plug 'mbbill/undotree'
Plug 'Yggdroot/indentLine'
endif

call plug#end()

0 comments on commit e34db2c

Please sign in to comment.