diff --git a/Makefile b/Makefile index 8697116..1aaef7e 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ install_i3: install_base install_gui remove_default_configs: rm -f ~/.zshrc - rm -fr ~/.config/i3/ + rm -f ~/.config/i3/config apply_configs: remove_default_configs stow -Rvt ~ home diff --git a/home/.config/nvim/init.lua b/home/.config/nvim/init.lua index 5789ff4..4422dba 100644 --- a/home/.config/nvim/init.lua +++ b/home/.config/nvim/init.lua @@ -184,8 +184,9 @@ vim.keymap.set('n', 'l', '', { desc = 'Forward' }) -- Copy'n'Paste vim.keymap.set('v', 'y', '"+y', { desc = 'Cop[y] selection to system clipboard' }) vim.keymap.set('n', 'y', function() - vim.fn.setreg('+', vim.fn.getreg('"')) - print('Copied to system clipboard') + local text = vim.fn.getreg '"' + vim.fn.system('xclip -i -selection clipboard', text) + print 'Copied to system clipboard' end, { silent = true, desc = 'Copy last [y]anked or deleted text to system clipboard', @@ -351,7 +352,6 @@ require('lazy').setup({ .. ' --line-number' .. ' --max-columns=512' .. ' --smart-case' - .. ' --hidden' .. ' --vimgrep', file_ignore_patterns = { '^node_modules/', diff --git a/home/.vimrc b/home/.vimrc index ca19425..2b37f48 100644 --- a/home/.vimrc +++ b/home/.vimrc @@ -1,3 +1,29 @@ +""" Common + + set encoding=utf-8 + set nocompatible + set mouse=a + set scrolloff=0 + + set number + set fillchars=eob:\ " No more ~ + + set nowrap + set autoindent + set expandtab + set smarttab + set tabstop=2 + set shiftwidth=2 + + let mapleader = ' ' + set ttimeoutlen=10 + + nnoremap + + nnoremap :nohl + + filetype plugin indent on + """ Plugins " :PlugInstall if empty(glob('~/.vim/autoload/plug.vim')) @@ -10,26 +36,8 @@ Plug 'widatama/vim-phoenix' call plug#end() -""" Common - - set mouse=a - set nowrap - set autoindent - set expandtab - set tabstop=2 - set shiftwidth=2 - - filetype plugin indent on - - let mapleader = ' ' - nnoremap - nnoremap :nohlsearch - """ Appearance - set number - set fillchars=eob:\ " - colorscheme phoenix PhoenixOrange @@ -41,38 +49,35 @@ """ Statusline + hi StatusLine ctermbg=none ctermfg=white cterm=bold + set noshowmode set laststatus=2 - hi StatusLine ctermbg=none ctermfg=white cterm=bold - hi StatusLineDim ctermbg=none ctermfg=gray cterm=bold - set statusline= set statusline+=%#StatusLine# - set statusline+=[%{mode()}] + set statusline+=%{mode()} + set statusline+=\ " Space + + set statusline+=%#LineNr# + set statusline+=%y + + set statusline+=%#StatusLine# set statusline+=\ %f set statusline+=\ %m set statusline+=%= - set statusline+=%#StatusLineDim# + set statusline+=%#LineNr# + set statusline+=%{&fileformat} set statusline+=\ %{&fileencoding?&fileencoding:&encoding} - set statusline+=\ %{&fileformat} - set statusline+=\ %y set statusline+=%#StatusLine# - set statusline+=\ %p%% set statusline+=\ %l:%c + set statusline+=\ %p%% + """ Copy'n'paste - function! PushToClipboard() - if !empty($WAYLAND_DISPLAY) - call system('wl-copy', @") - else - call system('xclip -i -selection clipboard', @") - endif - endfunction - - nnoremap y :call PushToClipboard() - vnoremap y y:call PushToClipboard() + nnoremap y :call system('xclip -i -selection clipboard', @@) + vnoremap y y:call system('xclip -i -selection clipboard', @@)