Compare commits

...

4 commits

Author SHA1 Message Date
51a478ea32 nvim: xclip no more 2026-05-30 02:52:00 +02:00
b7b1f2d4df vim: wayland-ready 2026-05-30 02:44:17 +02:00
96c353ef78 vim: trim config 2026-05-30 02:17:03 +02:00
c7532a4957 nvim: grep for dotfiles 2026-05-30 00:56:19 +02:00
2 changed files with 39 additions and 44 deletions

View file

@ -191,9 +191,8 @@ 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()
local text = vim.fn.getreg '"'
vim.fn.system('xclip -i -selection clipboard', text)
print 'Copied to system clipboard'
vim.fn.setreg('+', vim.fn.getreg('"'))
print('Copied to system clipboard')
end, {
silent = true,
desc = 'Copy last [y]anked or deleted text to system clipboard',
@ -359,6 +358,7 @@ require('lazy').setup({
.. ' --line-number'
.. ' --max-columns=512'
.. ' --smart-case'
.. ' --hidden'
.. ' --vimgrep',
file_ignore_patterns = {
'^node_modules/',

View file

@ -1,29 +1,3 @@
""" 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'))
@ -36,8 +10,26 @@
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
@ -49,35 +41,38 @@
""" 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+=\ " Space
set statusline+=%#LineNr#
set statusline+=%y
set statusline+=%#StatusLine#
set statusline+=[%{mode()}]
set statusline+=\ %f
set statusline+=\ %m
set statusline+=%=
set statusline+=%#LineNr#
set statusline+=%{&fileformat}
set statusline+=%#StatusLineDim#
set statusline+=\ %{&fileencoding?&fileencoding:&encoding}
set statusline+=\ %{&fileformat}
set statusline+=\ %y
set statusline+=%#StatusLine#
set statusline+=\ %l:%c
set statusline+=\ %p%%
set statusline+=\ %l:%c
""" Copy'n'paste
nnoremap <silent><leader>y :call system('xclip -i -selection clipboard', @@)<cr>
vnoremap <silent><leader>y y:call system('xclip -i -selection clipboard', @@)<cr>
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>