Compare commits

..

No commits in common. "51a478ea32c1a60c0661985ea6b69c920bd15252" and "4995b97853fab31b3589e3fd235daadf619613ef" have entirely different histories.

2 changed files with 44 additions and 39 deletions

View file

@ -191,8 +191,9 @@ vim.keymap.set('n', '<leader>l', '<C-i>', { desc = 'Forward' })
-- Copy'n'Paste
vim.keymap.set('v', '<leader>y', '"+y', { desc = 'Cop[y] selection to system clipboard' })
vim.keymap.set('n', '<leader>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',
@ -358,7 +359,6 @@ require('lazy').setup({
.. ' --line-number'
.. ' --max-columns=512'
.. ' --smart-case'
.. ' --hidden'
.. ' --vimgrep',
file_ignore_patterns = {
'^node_modules/',

View file

@ -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 <SPACE> <Nop>
nnoremap <Esc> :nohl<CR>
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 <SPACE> <Nop>
nnoremap <silent> <Esc> :nohlsearch<CR>
""" 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 <silent><leader>y :call PushToClipboard()<CR>
vnoremap <silent><leader>y y:call PushToClipboard()<CR>
nnoremap <silent><leader>y :call system('xclip -i -selection clipboard', @@)<cr>
vnoremap <silent><leader>y y:call system('xclip -i -selection clipboard', @@)<cr>