mirror of
https://gitlab.com/sagidayan/linux-config.git
synced 2024-11-22 07:15:25 +00:00
Merge branch 'update-and-nvim' into 'main'
Updates 22-06-01 See merge request sagidayan/linux-config!17
This commit is contained in:
commit
855301b835
7 changed files with 75 additions and 49 deletions
|
@ -319,4 +319,4 @@ schemes:
|
||||||
white: '#aeb3bb'
|
white: '#aeb3bb'
|
||||||
|
|
||||||
draw_bold_text_with_bright_colors: true
|
draw_bold_text_with_bright_colors: true
|
||||||
colors: *nord
|
colors: *gruvbox
|
||||||
|
|
|
@ -13,6 +13,7 @@ alias :Q=exit
|
||||||
alias ls='lsd'
|
alias ls='lsd'
|
||||||
alias f='printf "\033c"'
|
alias f='printf "\033c"'
|
||||||
alias top=btm
|
alias top=btm
|
||||||
|
alias vim=nvim
|
||||||
|
|
||||||
alias t=tmux
|
alias t=tmux
|
||||||
|
|
||||||
|
@ -74,9 +75,6 @@ function huh() {
|
||||||
echo Remotes:; \
|
echo Remotes:; \
|
||||||
echo -=-=-=-=; \
|
echo -=-=-=-=; \
|
||||||
git remote -v | cat; \
|
git remote -v | cat; \
|
||||||
echo;echo Files:; \
|
|
||||||
echo -=-=-=; \
|
|
||||||
ls -l; \
|
|
||||||
echo;echo;
|
echo;echo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -118,9 +116,10 @@ function ide() {
|
||||||
tmux split-window -h -p 80
|
tmux split-window -h -p 80
|
||||||
tmux split-window -h -p 30
|
tmux split-window -h -p 30
|
||||||
tmux send-keys "gitui" C-m
|
tmux send-keys "gitui" C-m
|
||||||
tmux select-pane -t 1
|
tmux split-window -v
|
||||||
tmux split-window -v -p 20
|
tmux select-pane -t 0
|
||||||
tmux select-pane -t 1
|
tmux split-window -v
|
||||||
|
tmux select-pane -t 2
|
||||||
tmux send-keys "vim" C-m
|
tmux send-keys "vim" C-m
|
||||||
tmux rename-window ${IDE_NAME}
|
tmux rename-window ${IDE_NAME}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,13 +6,15 @@
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
Plug 'sheerun/vim-polyglot' " A ton of language syntax
|
Plug 'sheerun/vim-polyglot' " A ton of language syntax
|
||||||
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' } " Markdown Preview
|
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' } " Markdown Preview
|
||||||
|
Plug 'pearofducks/ansible-vim' " Ansible support
|
||||||
Plug 'morhetz/gruvbox' " Gruvbox theme
|
Plug 'morhetz/gruvbox' " Gruvbox theme
|
||||||
Plug 'chriskempson/base16-vim' " Base 16 Themes - https://github.com/chriskempson/base16-vim
|
Plug 'chriskempson/base16-vim' " Base 16 Themes - https://github.com/chriskempson/base16-vim
|
||||||
Plug 'sickill/vim-monokai' " Monokai Theme
|
Plug 'sickill/vim-monokai' " Monokai Theme
|
||||||
Plug 'arcticicestudio/nord-vim' " Nord theme
|
Plug 'arcticicestudio/nord-vim' " Nord theme
|
||||||
Plug 'itchyny/lightline.vim' " vim status bar
|
Plug 'itchyny/lightline.vim' " vim status bar
|
||||||
|
Plug 'danilamihailov/beacon.nvim' " see cursor jumps easier
|
||||||
Plug 'shinchu/lightline-gruvbox.vim' " Gruvbox theme for status line
|
Plug 'shinchu/lightline-gruvbox.vim' " Gruvbox theme for status line
|
||||||
Plug 'airblade/vim-gitgutter' " Git gutter
|
Plug 'lewis6991/gitsigns.nvim' " Git gutter and sings
|
||||||
Plug 'zivyangll/git-blame.vim' " Git blame
|
Plug 'zivyangll/git-blame.vim' " Git blame
|
||||||
Plug 'lilydjwg/colorizer' " Displays the colors in file
|
Plug 'lilydjwg/colorizer' " Displays the colors in file
|
||||||
Plug 'jiangmiao/auto-pairs' " Auto create bracket/parens/quote pairs
|
Plug 'jiangmiao/auto-pairs' " Auto create bracket/parens/quote pairs
|
||||||
|
@ -25,9 +27,8 @@
|
||||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " Install fzf
|
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " Install fzf
|
||||||
Plug 'junegunn/fzf.vim' " Fuzzy search
|
Plug 'junegunn/fzf.vim' " Fuzzy search
|
||||||
Plug 'francoiscabrol/ranger.vim' " Ranger <leader>f
|
Plug 'francoiscabrol/ranger.vim' " Ranger <leader>f
|
||||||
Plug 'scrooloose/nerdtree' " NerdTree - File tree (ctr-n)
|
Plug 'kyazdani42/nvim-web-devicons' " for file icons
|
||||||
Plug 'Xuyuanp/nerdtree-git-plugin' " Git support in NERDTree
|
Plug 'kyazdani42/nvim-tree.lua' " File tree/browser
|
||||||
Plug 'ryanoasis/vim-devicons' " File Icons - Always load last
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
" Eliminate delay for esc insert->normal
|
" Eliminate delay for esc insert->normal
|
||||||
|
@ -52,9 +53,14 @@ autocmd VimEnter *
|
||||||
\ > len(filter(values(g:plugs), 'stridx(v:val.dir, g:plug_home) == 0'))
|
\ > len(filter(values(g:plugs), 'stridx(v:val.dir, g:plug_home) == 0'))
|
||||||
\| PlugClean | q
|
\| PlugClean | q
|
||||||
\| endif
|
\| endif
|
||||||
|
" Initiate lua
|
||||||
|
lua require('gitsigns').setup()
|
||||||
|
" Init NvimTree
|
||||||
|
lua require'nvim-tree'.setup {}
|
||||||
" Toggle NerdTree with Ctrl+n
|
" Toggle NerdTree with Ctrl+n
|
||||||
map <C-n> :NERDTreeToggle<CR>
|
nnoremap <C-n> :NvimTreeToggle<CR>
|
||||||
|
nnoremap <leader>r :NvimTreeRefresh<CR>
|
||||||
|
nnoremap <leader>n :NvimTreeFindFile<CR>
|
||||||
" Open fzf Files search Ctrl+p
|
" Open fzf Files search Ctrl+p
|
||||||
map <C-p> :Files<CR>
|
map <C-p> :Files<CR>
|
||||||
" Open file search Ctrl+f
|
" Open file search Ctrl+f
|
||||||
|
@ -79,8 +85,17 @@ imap <M-k> <Up>
|
||||||
|
|
||||||
" Set line heighlight on by default
|
" Set line heighlight on by default
|
||||||
set cursorline
|
set cursorline
|
||||||
" Set Clipboard to system
|
" Copy to clipboard
|
||||||
set clipboard=unnamedplus
|
vnoremap <leader>y "+y
|
||||||
|
nnoremap <leader>Y "+yg_
|
||||||
|
nnoremap <leader>y "+y
|
||||||
|
nnoremap <leader>yy "+yy
|
||||||
|
|
||||||
|
" Paste from clipboard
|
||||||
|
nnoremap <leader>p "+p
|
||||||
|
nnoremap <leader>P "+P
|
||||||
|
vnoremap <leader>p "+p
|
||||||
|
vnoremap <leader>P "+P
|
||||||
" Enable mouse use in all modes
|
" Enable mouse use in all modes
|
||||||
set mouse=a
|
set mouse=a
|
||||||
" Auto highlight similar words when staying on a word after .5 sec
|
" Auto highlight similar words when staying on a word after .5 sec
|
||||||
|
@ -88,12 +103,16 @@ set updatetime=500
|
||||||
augroup highlight_current_word
|
augroup highlight_current_word
|
||||||
au!
|
au!
|
||||||
au CursorHold *
|
au CursorHold *
|
||||||
\ if ( expand("%") != 'NERD_tree_1' )
|
\ if ( expand("%") != 'NvimTree_1' )
|
||||||
\ | :silent! :exec 'match Search /\V\<' . expand('<cword>') . '\>/'
|
\ | :silent! :exec 'match Search /\V\<' . expand('<cword>') . '\>/'
|
||||||
\ | endif
|
\ | endif
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
|
||||||
|
"==============================================================================
|
||||||
|
" Beacon settings
|
||||||
|
"==============================================================================
|
||||||
|
let g:beacon_minimal_jump = 1
|
||||||
"==============================================================================
|
"==============================================================================
|
||||||
" Sync NERDTree with file
|
" Sync NERDTree with file
|
||||||
"==============================================================================
|
"==============================================================================
|
||||||
|
@ -127,9 +146,9 @@ let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||||
set termguicolors
|
set termguicolors
|
||||||
" Theme
|
" Theme
|
||||||
colorscheme nord
|
colorscheme gruvbox
|
||||||
" Setting dark mode
|
" Setting dark mode
|
||||||
set background=dark
|
" set background=dark
|
||||||
|
|
||||||
"==============================================================================
|
"==============================================================================
|
||||||
" line number
|
" line number
|
||||||
|
@ -146,7 +165,7 @@ set background=dark
|
||||||
:augroup END
|
:augroup END
|
||||||
|
|
||||||
" Set current line number more visible
|
" Set current line number more visible
|
||||||
hi clear CursorLine
|
" hi clear CursorLine
|
||||||
augroup CLClear
|
augroup CLClear
|
||||||
autocmd! ColorScheme * hi clear CursorLine
|
autocmd! ColorScheme * hi clear CursorLine
|
||||||
augroup END
|
augroup END
|
||||||
|
@ -314,7 +333,7 @@ let g:lightline = {
|
||||||
\ },
|
\ },
|
||||||
\ }
|
\ }
|
||||||
" lightline colorscheme
|
" lightline colorscheme
|
||||||
" let g:lightline.colorscheme = 'nord'
|
" let g:lightline.colorscheme = 'gruvbox'
|
||||||
" function to get the filename from vim to lightline.vim
|
" function to get the filename from vim to lightline.vim
|
||||||
function! LightlineFilename()
|
function! LightlineFilename()
|
||||||
return &filetype ==# 'vimfiler' ? vimfiler#get_status_string() :
|
return &filetype ==# 'vimfiler' ? vimfiler#get_status_string() :
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
|
connection: local
|
||||||
name: CLI tools Playbook
|
name: CLI tools Playbook
|
||||||
vars:
|
vars:
|
||||||
# Theme options: monokai, gruvbox, nord, tomorrow-night
|
# Theme options: monokai, gruvbox, nord, tomorrow-night
|
||||||
theme: tomorrow-night
|
theme: gruxbox
|
||||||
# The running user
|
# The running user
|
||||||
running_user: "{{ ansible_user_id }}"
|
running_user: "{{ ansible_user_id }}"
|
||||||
roles:
|
roles:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
|
connection: local
|
||||||
name: Self managed modern UNIX tools
|
name: Self managed modern UNIX tools
|
||||||
vars:
|
vars:
|
||||||
# Theme options: monokai, gruvbox, nord, tomorrow-night
|
# Theme options: monokai, gruvbox, nord, tomorrow-night
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
name: Workstation Playbook
|
name: Workstation Playbook
|
||||||
vars:
|
vars:
|
||||||
# Theme options: monokai, gruvbox, nord, tomorrow-night
|
# Theme options: monokai, gruvbox, nord, tomorrow-night
|
||||||
theme: tomorrow-night
|
theme: gruvbox
|
||||||
# The running user
|
# The running user
|
||||||
running_user: "{{ ansible_user_id }}"
|
running_user: "{{ ansible_user_id }}"
|
||||||
roles:
|
roles:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
become: true
|
become: true
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- vim
|
- neovim
|
||||||
- the_silver_searcher
|
- the_silver_searcher
|
||||||
state: present
|
state: present
|
||||||
when: ansible_facts['os_family'] == "RedHat"
|
when: ansible_facts['os_family'] == "RedHat"
|
||||||
|
@ -11,34 +11,40 @@
|
||||||
become: true
|
become: true
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- vim
|
- neovim
|
||||||
- silversearcher-ag
|
- silversearcher-ag
|
||||||
state: present
|
state: present
|
||||||
when: ansible_facts['os_family'] == "Debian"
|
when: ansible_facts['os_family'] == "Debian"
|
||||||
|
|
||||||
- name: Prepare vim...
|
- name: Prepare vim config directory
|
||||||
file:
|
file:
|
||||||
path: ~/.vim/autoload
|
path: ~/.config/nvim/
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: Setup vim plug
|
||||||
|
file:
|
||||||
|
path: ~/.local/share/nvim/site/autoload
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
- name: Install vim Plug
|
- name: Install vim Plug
|
||||||
get_url:
|
get_url:
|
||||||
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
dest: ~/.vim/autoload/plug.vim
|
dest: ~/.local/share/nvim/site/autoload/plug.vim
|
||||||
|
|
||||||
- name: "Copy vimrc file"
|
- name: "Copy vimrc file"
|
||||||
copy:
|
copy:
|
||||||
src: dotfiles/vimrc
|
src: dotfiles/vimrc
|
||||||
dest: "~/.vimrc"
|
dest: "~/.config/nvim/init.vim"
|
||||||
mode: preserve
|
mode: preserve
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: "Set vim colorscheme"
|
- name: "Set vim colorscheme"
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: "~/.vimrc"
|
path: "~/.config/nvim/init.vim"
|
||||||
regexp: "^colorscheme"
|
regexp: "^colorscheme"
|
||||||
line: "colorscheme base16-{{ theme }}"
|
line: "colorscheme {{ theme }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
#- name: "Set vim lightline colorscheme"
|
#- name: "Set vim lightline colorscheme"
|
||||||
|
|
Loading…
Reference in a new issue