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 -- Copy'n'Paste
vim.keymap.set('v', '<leader>y', '"+y', { desc = 'Cop[y] selection to system clipboard' }) vim.keymap.set('v', '<leader>y', '"+y', { desc = 'Cop[y] selection to system clipboard' })
vim.keymap.set('n', '<leader>y', function() vim.keymap.set('n', '<leader>y', function()
vim.fn.setreg('+', vim.fn.getreg('"')) local text = vim.fn.getreg '"'
print('Copied to system clipboard') vim.fn.system('xclip -i -selection clipboard', text)
print 'Copied to system clipboard'
end, { end, {
silent = true, silent = true,
desc = 'Copy last [y]anked or deleted text to system clipboard', desc = 'Copy last [y]anked or deleted text to system clipboard',
@ -358,7 +359,6 @@ require('lazy').setup({
.. ' --line-number' .. ' --line-number'
.. ' --max-columns=512' .. ' --max-columns=512'
.. ' --smart-case' .. ' --smart-case'
.. ' --hidden'
.. ' --vimgrep', .. ' --vimgrep',
file_ignore_patterns = { file_ignore_patterns = {
'^node_modules/', '^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 """ Plugins
" :PlugInstall " :PlugInstall
if empty(glob('~/.vim/autoload/plug.vim')) if empty(glob('~/.vim/autoload/plug.vim'))
@ -10,26 +36,8 @@
Plug 'widatama/vim-phoenix' Plug 'widatama/vim-phoenix'
call plug#end() 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 """ Appearance
set number
set fillchars=eob:\ "
colorscheme phoenix colorscheme phoenix
PhoenixOrange PhoenixOrange
@ -41,38 +49,35 @@
""" Statusline """ Statusline
hi StatusLine ctermbg=none ctermfg=white cterm=bold
set noshowmode set noshowmode
set laststatus=2 set laststatus=2
hi StatusLine ctermbg=none ctermfg=white cterm=bold
hi StatusLineDim ctermbg=none ctermfg=gray cterm=bold
set statusline= set statusline=
set statusline+=%#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+=\ %f
set statusline+=\ %m set statusline+=\ %m
set statusline+=%= set statusline+=%=
set statusline+=%#StatusLineDim# set statusline+=%#LineNr#
set statusline+=%{&fileformat}
set statusline+=\ %{&fileencoding?&fileencoding:&encoding} set statusline+=\ %{&fileencoding?&fileencoding:&encoding}
set statusline+=\ %{&fileformat}
set statusline+=\ %y
set statusline+=%#StatusLine# set statusline+=%#StatusLine#
set statusline+=\ %p%%
set statusline+=\ %l:%c set statusline+=\ %l:%c
set statusline+=\ %p%%
""" Copy'n'paste """ Copy'n'paste
function! PushToClipboard() nnoremap <silent><leader>y :call system('xclip -i -selection clipboard', @@)<cr>
if !empty($WAYLAND_DISPLAY) vnoremap <silent><leader>y y:call system('xclip -i -selection clipboard', @@)<cr>
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>