diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2020-12-03 14:22:17 +0200 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2020-12-03 14:22:17 +0200 |
| commit | 1d6857927239834da3c5224dc3afb9aad025a741 (patch) | |
| tree | 07e646854de48bdd54fe86b601aa0619a83071f0 | |
| parent | 9aa68033583390757cbd65329db8cce9f3078b84 (diff) | |
| download | dotfiles-1d6857927239834da3c5224dc3afb9aad025a741.tar dotfiles-1d6857927239834da3c5224dc3afb9aad025a741.tar.gz dotfiles-1d6857927239834da3c5224dc3afb9aad025a741.zip | |
Added dotfiles from LinuxMintCinnamon-setup
| -rw-r--r-- | .config/Min/settings.json | 1 | ||||
| -rw-r--r-- | .config/Min/userscripts/userscripts-list.txt | 6 | ||||
| -rw-r--r-- | .config/Min/windowBounds.json | 1 | ||||
| -rw-r--r-- | .config/copyq/copyq.conf | 179 | ||||
| -rw-r--r-- | .config/terminator/config | 27 | ||||
| -rw-r--r-- | .gitconfig | 4 | ||||
| -rw-r--r-- | .gitignore | 1 | ||||
| -rwxr-xr-x | .moc/config | 5 | ||||
| -rw-r--r-- | .moc/themes/rapture | 41 | ||||
| -rw-r--r-- | .vimrc | 452 | ||||
| -rwxr-xr-x | .zshrc | 141 |
11 files changed, 858 insertions, 0 deletions
diff --git a/.config/Min/settings.json b/.config/Min/settings.json new file mode 100644 index 0000000..ced25ab --- /dev/null +++ b/.config/Min/settings.json @@ -0,0 +1 @@ +{"filtering":{"blockingLevel":2,"contentTypes":[],"exceptionDomains":["github.com","www.reddit.com"]},"darkMode":1,"userscriptsEnabled":true,"customUserAgent":null,"keyMap":{"toggleTasks":["option+w","option+в"],"goBack":"option+left","goForward":"option+right","reload":["mod+r","f5"],"addTask":["option+n","option+н"],"addTab":["option+q","option+я"],"addPrivateTab":["mod+option+q","mod+option+я"],"closeTab":["option+a","option+а"],"restoreTab":["option+z","option+з"],"enterEditMode":["mod+l","mod+k","option+s","option+с"],"switchToNextTab":["option+mod+right","mod+tab","shift+mod+pagedown","option+]"],"switchToPreviousTab":["option+mod+left","shift+mod+tab","shift+mod+pageup","option+["],"duplicateTab":["shift+mod+d","shift+mod+д"]},"passwordManager":null,"useSeparateTitlebar":false,"filteringBlockedCount":414362,"readerData":"{\"version\":1,\"data\":{\"domainStatus\":{},\"URLStatus\":{\"https://en.wikipedia.org/wiki/Rock_climbing\":{\"lastVisit\":1605006543531,\"isReaderable\":false},\"https://www.howtogeek.com/255587/how-to-find-your-firefox-profile-folder-on-windows-mac-and-linux/\":{\"lastVisit\":1605086032550,\"isReaderable\":false},\"https://en.wikipedia.org/wiki/Salamander\":{\"lastVisit\":1605270025217,\"isReaderable\":false}}}}"}
\ No newline at end of file diff --git a/.config/Min/userscripts/userscripts-list.txt b/.config/Min/userscripts/userscripts-list.txt new file mode 100644 index 0000000..abb4311 --- /dev/null +++ b/.config/Min/userscripts/userscripts-list.txt @@ -0,0 +1,6 @@ +Name | Link +-----------------------------|-------------------------------------------------------------------------- +link-tooltip | https://github.com/PalmerAL/min-link-tooltip-userscript +youtube-element-blocker | https://github.com/Syndamia/min-youtube-element-blocker +min-css-scrollbar-userscript | https://github.com/ivancizik/min-css-scrollbar-userscript +no-more-youtube-ads | https://greasyfork.org/en/scripts/407477-no-more-youtube-ads-updated/code diff --git a/.config/Min/windowBounds.json b/.config/Min/windowBounds.json new file mode 100644 index 0000000..fee7597 --- /dev/null +++ b/.config/Min/windowBounds.json @@ -0,0 +1 @@ +{"x":0,"y":0,"width":1920,"height":1080,"maximized":true}
\ No newline at end of file diff --git a/.config/copyq/copyq.conf b/.config/copyq/copyq.conf new file mode 100644 index 0000000..20a25b1 --- /dev/null +++ b/.config/copyq/copyq.conf @@ -0,0 +1,179 @@ +[General] +plugin_priority=itemimage, itemencrypted, itemfakevim, itemnotes, itempinned, itemsync, itemtags, itemtext + +[Options] +action_has_input=false +action_has_output=false +action_output_tab= +action_separator=\\n +activate_closes=true +activate_focuses=false +activate_pastes=false +always_on_top=true +autocompletion=true +autostart=true +check_clipboard=true +check_selection=false +clipboard_notification_lines=0 +clipboard_tab=&clipboard +close_on_unfocus=true +command_history_size=100 +confirm_exit=true +copy_clipboard=false +copy_selection=false +disable_tray=false +edit_ctrl_return=true +editor=gedit --standalone --1000 %1 +expire_tab=0 +hide_main_window=true +hide_main_window_in_task_bar=false +hide_tabs=true +hide_toolbar=true +hide_toolbar_labels=true +item_popup_interval=0 +language=en +max_process_manager_rows=1000 +maxitems=200 +move=true +notification_horizontal_offset=10 +notification_maximum_height=100 +notification_maximum_width=300 +notification_position=3 +notification_vertical_offset=10 +number_search=false +open_windows_on_current_screen=true +run_selection=true +save_filter_history=false +show_advanced_command_settings=false +show_simple_items=false +show_tab_item_count=false +tab_tree=false +tabs=&clipboard +text_wrap=true +transparency=0 +transparency_focused=0 +tray_commands=false +tray_images=true +tray_item_paste=false +tray_items=21 +tray_tab= +tray_tab_is_current=false +vi=false + +[Plugins] +itemencrypted\enabled=true +itemfakevim\enabled=true +itemfakevim\really_enable=false +itemfakevim\source_file= +itemimage\enabled=true +itemimage\image_editor= +itemimage\max_image_height=240 +itemimage\max_image_width=320 +itemimage\svg_editor= +itemnotes\enabled=true +itempinned\enabled=true +itemsync\enabled=true +itemtags\enabled=true +itemtext\enabled=true +itemtext\max_height=0 +itemtext\max_lines=0 +itemtext\use_rich_text=false + +[Shortcuts] +about=shift+f1 +change_tab_icon=ctrl+shift+t +commands=f6 +copy_selected_items=ctrl+c +delete_item=del +edit=f2 +edit_notes=shift+f2 +editor=ctrl+e +exit=ctrl+q +export=ctrl+s +find_items=f3 +help=f1 +import=ctrl+i +item-menu=shift+f10 +move_down=ctrl+down +move_to_bottom=ctrl+end +move_to_clipboard= +move_to_top=ctrl+home +move_up=ctrl+up +new=ctrl+n +new_tab=ctrl+t +next_tab=right +paste_selected_items=ctrl+v +preferences=ctrl+p +previous_tab=left +process_manager=ctrl+shift+z +remove_tab=ctrl+w +rename_tab=ctrl+f2 +reverse_selected_items=ctrl+shift+r +show-log=f12 +show_clipboard_content=ctrl+shift+c +show_item_content=f4 +show_item_preview=f7 +sort_selected_items=ctrl+shift+s +system-run=f5 +toggle_clipboard_storing=ctrl+shift+x + +[Tabs] +1\icon= +1\max_item_count=0 +1\name=&clipboard +1\store_items=true +size=1 + +[Theme] +alt_bg=#3c3c3c +alt_item_css= +bg=#404040 +css= +cur_item_css="\n ;border: 0.1em solid ${sel_bg}" +edit_bg=#404040 +edit_fg=#d3d3d3 +edit_font= +fg=#d3d3d3 +find_bg=#ff0 +find_fg=#000 +find_font= +font= +font_antialiasing=true +item_css= +item_spacing= +menu_bar_css="\n ;background: ${bg}\n ;color: ${fg}" +menu_bar_disabled_css="\n ;color: ${bg - #666}" +menu_bar_selected_css="\n ;background: ${sel_bg}\n ;color: ${sel_fg}" +menu_css="\n ;border: 1px solid ${sel_bg}\n ;background: ${bg}\n ;color: ${fg}" +notes_bg=#ffffdc +notes_css= +notes_fg=#d3d3d3 +notes_font= +notification_bg=#333 +notification_fg=#ddd +notification_font= +num_fg=#ffffff +num_font= +search_bar="\n ;background: ${edit_bg}\n ;color: ${edit_fg}\n ;border: 1px solid ${alt_bg}\n ;margin: 2px" +search_bar_focused="\n ;border: 1px solid ${sel_bg}" +sel_bg=#596eb5 +sel_fg=#ffffff +sel_item_css= +show_number=true +show_scrollbars=true +style_main_window=false +tab_bar_css="\n ;background: ${bg - #222}" +tab_bar_item_counter="\n ;color: ${fg - #044 + #400}\n ;font-size: 6pt" +tab_bar_scroll_buttons_css="\n ;background: ${bg - #222}\n ;color: ${fg}\n ;border: 0" +tab_bar_sel_item_counter="\n ;color: ${sel_bg - #044 + #400}" +tab_bar_tab_selected_css="\n ;padding: 0.5em\n ;background: ${bg}\n ;border: 0.05em solid ${bg}\n ;color: ${fg}" +tab_bar_tab_unselected_css="\n ;border: 0.05em solid ${bg}\n ;padding: 0.5em\n ;background: ${bg - #222}\n ;color: ${fg - #333}" +tab_tree_css="\n ;color: ${fg}\n ;background-color: ${bg}" +tab_tree_item_counter="\n ;color: ${fg - #044 + #400}\n ;font-size: 6pt" +tab_tree_sel_item_counter="\n ;color: ${sel_fg - #044 + #400}" +tab_tree_sel_item_css="\n ;color: ${sel_fg}\n ;background-color: ${sel_bg}\n ;border-radius: 2px" +tool_bar_css="\n ;color: ${fg}\n ;background-color: ${bg}\n ;border: 0" +tool_button_css="\n ;color: ${fg}\n ;background: ${bg}\n ;border: 0\n ;border-radius: 2px" +tool_button_pressed_css="\n ;background: ${sel_bg}" +tool_button_selected_css="\n ;background: ${sel_bg - #222}\n ;color: ${sel_fg}\n ;border: 1px solid ${sel_bg}" +use_system_icons=false diff --git a/.config/terminator/config b/.config/terminator/config new file mode 100644 index 0000000..aa24c78 --- /dev/null +++ b/.config/terminator/config @@ -0,0 +1,27 @@ +[global_config] + handle_size = 1 + sticky = True + suppress_multiple_term_dialog = True +[keybindings] +[profiles] + [[default]] + audible_bell = True + background_color = "#282828" + background_darkness = 0.95 + cursor_color = "#aaaaaa" + font = MesloLGS NF 12 + foreground_color = "#ebdbb2" + show_titlebar = False + scrollbar_position = hidden + scrollback_infinite = True + palette = "#282828:#cc241d:#98971a:#d79921:#458588:#b16286:#689d6a:#a89984:#928374:#fb4934:#b8bb26:#fabd2f:#83a598:#d3869b:#8ec07c:#ebdbb2" + use_system_font = False +[layouts] + [[default]] + [[[window0]]] + type = Window + parent = "" + [[[child1]]] + type = Terminal + parent = window0 +[plugins] diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..3014beb --- /dev/null +++ b/.gitconfig @@ -0,0 +1,4 @@ +[credential] + helper = store +[core] + excludesFile = ~/.gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/.moc/config b/.moc/config new file mode 100755 index 0000000..617c365 --- /dev/null +++ b/.moc/config @@ -0,0 +1,5 @@ +MusicDir = "/home/kamen/Nextcloud/Music/" +ShowTime = yes +ShowTimePercent = yes +Theme = rapture +Layout1 = directory(0,0,FILL,FILL) diff --git a/.moc/themes/rapture b/.moc/themes/rapture new file mode 100644 index 0000000..5cb5324 --- /dev/null +++ b/.moc/themes/rapture @@ -0,0 +1,41 @@ +############################################################################## +# +# Rapture Theme by Kamen Mladenov <syndamia@protonmail.com> +# +# A gruvbox-inspired theme for MOC (Music On Console) +# +############################################################################## + +background = white black +frame = white black +window_title = white black bold,dim +directory = white black bold +selected_directory = black white bold +file = green black bold +selected_file = black yellow bold +selected_info = black yellow bold +marked_file = red black bold +marked_selected_file = red white bold +marked_info = blue black bold +marked_selected_info = blue white bold +info = magenta black bold +status = yellow black bold +title = yellow black bold +state = black white bold +current_time = green black bold +time_left = red black bold +total_time = black black +time_total_frames = black black +sound_parameters = cyan black bold +legend = cyan black +disabled = red black bold +enabled = white black bold +empty_mixer_bar = white black +filled_mixer_bar = black white +empty_time_bar = white black bold +filled_time_bar = black yellow bold +entry = white black +entry_title = magenta black bold +error = black red bold +message = white black bold,dim +plist_time = black white @@ -0,0 +1,452 @@ +""""""""""""""""""""""""""""""" +" Plugin Manager +""""""""""""""""""""""""""""""" + +call plug#begin('~/.vim/plugged') + +"""""""""""""""""""""""""""""" +" Plugins + +Plug 'morhetz/gruvbox', {'rtp': 'vim'} " Color theme +Plug 'junegunn/fzf' " Used for commands like :Commits, :History, :Files +Plug 'junegunn/fzf.vim' +Plug 'preservim/nerdtree' " Browse directories (:NERDTree) +Plug 'Raimondi/delimitMate' " Autocomplete brackets and quotes +Plug 'tomtom/tcomment_vim' " Toggle comments (gc, gcc) +Plug 'godlygeek/tabular' " Line up text by a given character (:Tabularize /CHAR) +Plug 'vim-syntastic/syntastic' " Syntax error checker +Plug 'neoclide/coc.nvim', {'branch': 'release'} " IntelliSense practically +Plug 'itchyny/lightline.vim' " Statusline for Vim +Plug 'tpope/vim-fugitive' " git integration +Plug 'mbbill/undotree' " Easily interact with undo history +" Plug 'OmniSharp/omnisharp-vim' " C# tools (autocompletion, ...) +Plug 'wakatime/vim-wakatime' " Time tracking via wakaime.com +Plug 'dense-analysis/ale' " Syntax checker via LSP +Plug 'ryanoasis/vim-devicons' " Icons on stuff like NERDTree +Plug 'honza/vim-snippets' " Ready snippets for some langauges + +"""""""""""""""""""""""""""""""" + +call plug#end() + +""""""""""""""""""""""""""""""" +" Color scheme settings +""""""""""""""""""""""""""""""" + +colorscheme gruvbox +set background=dark " Setting dark mode +let g:gruvbox_contrast_dark='medium' + +""""""""""""""""""""""""""""""" +" NERDTree settings +""""""""""""""""""""""""""""""" + +let NERDTreeCustomOpenArgs={'file':{'where': 't'}} " Open file in new tab, doesn't work only for double-click +let NERDTreeShowHidden=1 +" Toggle NERDTree with Tab +nmap <Tab> :NERDTreeToggle<CR> + +""""""""""""""""""""""""""""""" +" Undotree settings +""""""""""""""""""""""""""""""" + +" Toggle undotree with F5 +nmap <F5> :UndotreeToggle<CR> + +if !exists('g:undotree_WindowLayout') + let g:undotree_WindowLayout = 2 +endif + +" e.g. using 'd' instead of 'days' to save some space. +if !exists('g:undotree_ShortIndicators') + let g:undotree_ShortIndicators = 1 +endif + +" if set, let undotree window get focus after being opened, otherwise +" focus will stay in current window. +if !exists('g:undotree_SetFocusWhenToggle') + let g:undotree_SetFocusWhenToggle = 1 +endif + +" tree node shape. +if !exists('g:undotree_TreeNodeShape') + let g:undotree_TreeNodeShape = '*' +endif + +if !exists('g:undotree_DiffCommand') + let g:undotree_DiffCommand = "diff" +endif + +""""""""""""""""""""""""""""""" +" Syntastic settings +""""""""""""""""""""""""""""""" + +set statusline+=%#warningmsg# +set statusline+=%{SyntasticStatuslineFlag()} +set statusline+=%* + +let g:syntastic_always_populate_loc_list=1 +let g:syntastic_auto_loc_list=1 +let g:syntastic_check_on_open=1 +let g:syntastic_check_on_wq=0 + +""""""""""""""""""""""""""""""" +" Vim settings +""""""""""""""""""""""""""""""" + +set backspace=indent,eol,start " Better backspace functionality + +" Ctrl+c, Ctrl+v, Ctrl+z, Ctrl+a and Ctrl+s bindings +" Partly taken from: https://gist.github.com/jshih/3423345 +vmap <C-c> "+yi<Esc> +vmap <C-x> "+c<Esc> +vmap <C-v> c<ESC>"+p<Esc> +imap <C-v> <ESC>"+pa +map <C-a> ggVG +imap <C-z> <ESC>ui +imap <C-r> <ESC><C-r>i +"imap <C-S-z> <C-r> An impossible dream +imap <C-s> <ESC>:w<CR>a + +" The following work the same as usual (as :x and :xa), but can also close running jobs (e.g. terminal windows) +ca x w <bar> q! +ca xa wa <bar> qa! + +ca tt tab ter +ca te tabe + +" Go between tabs with Ctrl+k (tab to the right) and Ctrl+j (tab to the left) +nnoremap <C-k> :tabn<CR> +nnoremap <C-j> :tabp<CR> + +set number " Show line numbers to the left +set cursorline " Highlight the current line + +nnoremap = :tab ter ++close lazygit<CR> + +" Don't get into insert mode after adding a line with o/O +nnoremap o o<Esc> +nnoremap O O<Esc> + +" Do omni completion from Ctrl+Space +nnoremap <C-Space> <C-X><C-O> + +set mouse=a " Mouse support + +set tabstop=4 " Show tabs as 4 wide +set shiftwidth=4 " Indent with 4 spaces +set expandtab " Convert tabs to spaces +autocmd Filetype css setlocal tabstop=2 " Show CSS tabs as 2 spaces + +" When you press F6 it will toggle a "spell check mode", +" spell is activated and the colorscheme is changed +nmap <F6> :call SpellCheckModeToggle()<CR> + +function! SpellCheckModeToggle() + if g:colors_name == 'gruvbox' + set spell + colorscheme darkblue + else + set nospell + colorscheme gruvbox + endif +endfunction + +" Scrolling (shows history) in terminal (except in lazygit) +" Scroll up to activate it, and press a to deactivate it +" Slightly modified version of: https://github.com/vim/vim/issues/2490#issuecomment-393973253 +function! ExitNormalMode() + unmap <buffer> <silent> <RightMouse> + call feedkeys("a") +endfunction + +function! EnterNormalMode() + if @% == '!lazygit' + tunmap <silent> <ScrollWheelUp> + elseif &buftype == 'terminal' && mode('') == 't' + call feedkeys("\<c-w>N") + call feedkeys("\<c-y>") + map <buffer> <silent> <RightMouse> :call ExitNormalMode()<CR> + endif +endfunction + +tmap <silent> <ScrollWheelUp> <c-w>:call EnterNormalMode()<CR> + +""""""""""""""""""""""""""""""" +" Lighline settings +""""""""""""""""""""""""""""""" + +set laststatus=2 + +if !has('gui_running') + set t_Co=256 +endif + +let g:lightline = { + \ 'colorscheme': 'wombat', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'gitbranch', 'filename', 'charvaluehex', 'readonly', 'modified' ] ], + \ 'right': [ [ 'lineinfo' ], + \ [ 'fileencoding', 'filetype'] ] + \ }, + \ 'component': { + \ 'charvaluehex': '0x%B', + \ }, + \ 'component_function': { + \ 'gitbranch': 'LightlineFugitive', + \ 'readonly': 'LightlineReadonly', + \ 'modified': 'LightlineModified', + \ 'filetype': 'LightlineFileType' + \ }, + \ 'tabline': { + \ 'right': [[]] + \ }, + \ 'tab': { + \ 'active': [ 'iconFilename','iconReadonly', 'iconModified' ], + \ 'inactive': [ 'iconFilename', 'iconReadonly', 'iconModified' ] + \ }, + \ 'tab_component_function': { + \ 'iconFilename': 'LightlineTabFilename', + \ 'iconReadonly': 'LightlineTabReadonly', + \ 'iconModified': 'LightlineTabModified', + \ 'iconClose': 'LightlineTabIconClose' + \ }, + \ 'separator': { 'left': '', 'right': '' }, + \ 'subseparator': { 'left': '', 'right': '' }, + \ 'tabline_separator': { 'left': '▒', 'right': '' }, + \ 'tabline_subseparator': { 'left': '░' } + \ } + +" Most of the following functions are just modification of source: +" Examples from doc file - https://github.com/itchyny/lightline.vim/blob/53176a0b75d6389d775d7bce0d494e58fc654f38/doc/lightline.txt#L583 +" Tab source code - https://github.com/itchyny/lightline.vim/blob/master/autoload/lightline/tab.vim + +function! LightlineFugitive() + if exists('*FugitiveHead') + let branch = FugitiveHead() + return branch !=# '' ? ' '.branch : '' + endif + return '' +endfunction + +function! LightlineReadonly() + return &ft !~? 'help\|vimfiler' && &readonly ? '' : '' +endfunction + +function! LightlineModified() + return &ft =~ 'help\|vimfiler' ? '' : &modified ? '' : &modifiable ? '' : '' +endfunction + +function! LightlineFileType() + return strlen(&filetype) ? WebDevIconsGetFileTypeSymbol() . ' ' . &filetype : '' +endfunction + +" Adds the filetype icon in tabs +function! LightlineTabFilename(n) abort + let buflist = tabpagebuflist(a:n) + let winnr = tabpagewinnr(a:n) + let _ = expand('#'.buflist[winnr - 1].':t') + return WebDevIconsGetFileTypeSymbol(_) . ' ' . ( _ !=# '' ? _ : '[No Name]' ) +endfunction + +function! LightlineTabReadonly(n) abort + let winnr = tabpagewinnr(a:n) + return gettabwinvar(a:n, winnr, '&readonly') ? '' : '' +endfunction + +function! LightlineTabModified(n) abort + let winnr = tabpagewinnr(a:n) + return gettabwinvar(a:n, winnr, '&modified') ? '' : gettabwinvar(a:n, winnr, '&modifiable') ? '' : '' +endfunction + +""""""""""""""""""""""""""""""" +" Enable Omni completion +""""""""""""""""""""""""""""""" + +" Omni completion supports C, HTML, CSS, JavaScript, PHP, Python, Ruby, SQL, XML + +filetype plugin on +set omnifunc=syntaxcomplete#Complete " Completion for all supported languages + +""""""""""""""""""""""""""""""" +" Ale settings +""""""""""""""""""""""""""""""" + +let g:ale_linters = { +\ 'cs': ['OmniSharp'], +\} +let b:ale_linters = ['cs'] + +""""""""""""""""""""""""""""""" +" OmniSharp settings +""""""""""""""""""""""""""""""" + +autocmd Filetype cs nmap <silent> <buffer> gd : OmniSharpGotoDefinition<CR> +autocmd Filetype cs nmap <silent> <buffer> gy : OmniSharpTypeLookup<CR> +autocmd Filetype cs nmap <silent> <buffer> gi : OmniSharpFindImplementations<CR> +autocmd Filetype cd nmap <silent> <buffer> gr : OmniSharpFindUsages<CR> +autocmd FileType cs nmap <silent> <buffer> <F2> : OmniSharpRename<CR> +autocmd FileType cs nmap <silent> <buffer> ff : OmniSharpCodeFormat<CR> + +""""""""""""""""""""""""""""""" +" COC settings +""""""""""""""""""""""""""""""" + +" All of the following is the example configuration with some values modified +" https://github.com/neoclide/coc.nvim#example-vim-configuration + +" TextEdit might fail if hidden is not set. +set hidden + +" Some servers have issues with backup files, see #649. +set nobackup +set nowritebackup + +" Give more space for displaying messages. +set cmdheight=2 + +" Having longer update time (default is 4000 ms = 4 s) leads to noticeable +" delays and poor user experience. +set updatetime=300 + +" Don't pass messages to |ins-completion-menu|. +set shortmess+=c + +" Always show the signcolumn, otherwise it would shift the text each time +" diagnostics appear/become resolved. +if has("patch-8.1.1564") + " Recently vim can merge signcolumn and number column into one + set signcolumn=number +else + set signcolumn=yes +endif + +" Use tab for trigger completion with characters ahead and navigate. +" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by +" other plugin before putting this into your config. +inoremap <silent><expr> <TAB> + \ pumvisible() ? "\<C-n>" : + \ <SID>check_back_space() ? "\<TAB>" : + \ coc#refresh() +inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>" + +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +" Use <c-space> to trigger completion. +if has('nvim') + inoremap <silent><expr> <c-space> coc#refresh() +else + inoremap <silent><expr> <c-@> coc#refresh() +endif + +" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current +" position. Coc only does snippet and additional edit on confirm. +" <cr> could be remapped by other vim plugin, try `:verbose imap <CR>`. +if exists('*complete_info') + inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>" +else + inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>" +endif + +" Use `[g` and `]g` to navigate diagnostics +" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list. +nmap <silent> [g <Plug>(coc-diagnostic-prev) +nmap <silent> ]g <Plug>(coc-diagnostic-next) + +" GoTo code navigation. +nmap <silent> gd <Plug>(coc-definition) +nmap <silent> gy <Plug>(coc-type-definition) +nmap <silent> gi <Plug>(coc-implementation) +nmap <silent> gr <Plug>(coc-references) + +" Use K to show documentation in preview window. +nnoremap <silent> K :call <SID>show_documentation()<CR> + +function! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('<cword>') + else + call CocAction('doHover') + endif +endfunction + +" Highlight the symbol and its references when holding the cursor. +autocmd CursorHold * silent call CocActionAsync('highlight') + +" Symbol renaming. +nmap <leader>rn <Plug>(coc-rename) + +" Formatting selected code. +xmap <leader>f <Plug>(coc-format-selected) +nmap <leader>f <Plug>(coc-format-selected) + +augroup mygroup + autocmd! + " Setup formatexpr specified filetype(s). + autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') + " Update signature help on jump placeholder. + autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') +augroup end + +" Applying codeAction to the selected region. +" Example: `<leader>aap` for current paragraph +xmap <leader>a <Plug>(coc-codeaction-selected) +nmap <leader>a <Plug>(coc-codeaction-selected) + +" Remap keys for applying codeAction to the current buffer. +nmap <leader>ac <Plug>(coc-codeaction) +" Apply AutoFix to problem on the current line. +nmap <leader>qf <Plug>(coc-fix-current) + +" Map function and class text objects +" NOTE: Requires 'textDocument.documentSymbol' support from the language server. +xmap if <Plug>(coc-funcobj-i) +omap if <Plug>(coc-funcobj-i) +xmap af <Plug>(coc-funcobj-a) +omap af <Plug>(coc-funcobj-a) +xmap ic <Plug>(coc-classobj-i) +omap ic <Plug>(coc-classobj-i) +xmap ac <Plug>(coc-classobj-a) +omap ac <Plug>(coc-classobj-a) + +" Use CTRL-S for selections ranges. +" Requires 'textDocument/selectionRange' support of language server. +nmap <silent> <C-s> <Plug>(coc-range-select) +xmap <silent> <C-s> <Plug>(coc-range-select) + +" Add `:Format` command to format current buffer. +command! -nargs=0 Format :call CocAction('format') + +" Add `:Fold` command to fold current buffer. +command! -nargs=? Fold :call CocAction('fold', <f-args>) + +" Add `:OR` command for organize imports of the current buffer. +command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') + +" Add (Neo)Vim's native statusline support. +" NOTE: Please see `:h coc-status` for integrations with external plugins that +" provide custom statusline: lightline.vim, vim-airline. +set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} + +" Mappings for CoCList +" Show all diagnostics. +nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr> +" Manage extensions. +nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr> +" Show commands. +nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr> +" Find symbol of current document. +nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr> +" Search workspace symbols. +nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr> +" Do default action for next item. +nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR> +" Do default action for previous item. +nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR> +" Resume latest coc list. +nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR> + @@ -0,0 +1,141 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="/home/kamen/.oh-my-zsh" + +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time oh-my-zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes + +ZSH_THEME="gruvbox" +SOLARIZED_THEME="dark" + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in $ZSH/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment the following line to disable bi-weekly auto-update checks. +# DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to automatically update without prompting. +# DISABLE_UPDATE_PROMPT="true" + +# Uncomment the following line to change how often to auto-update (in days). +# export UPDATE_ZSH_DAYS=13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git) + +source $ZSH/oh-my-zsh.sh + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" + +source ~/powerlevel10k/powerlevel10k.zsh-theme + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +# Disables Software Flow Control +stty -F/dev/tty -ixon -ixoff + +# ------------------------------------------------------------------------------ +# Aliases +# ------------------------------------------------------------------------------ + +alias ydl="youtube-dl" +alias ydlba="youtube-dl --audio-format best -x" + +alias sasy="sudo apt install -y" +alias sary="sudo apt remove -y" +alias saty="sudo apt autoremove -y" +alias sagt="sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && youtube-dl --update && wget -O - https://raw.githubusercontent.com/laurent22/joplin/master/Joplin_install_and_update.sh | bash" + +alias ll="la -alF" +alias la="ls -A" +alias l="ls -CF" + +alias q="exit" +alias x="exit" + +alias cdp="cd ~/Programming/GitHub-repos/" |
