added files or templates to be copied or used for configuration of vim/nvim editors on remote host
This commit is contained in:
5
roles/init-server/files/user/config/nvim/init.vim
Normal file
5
roles/init-server/files/user/config/nvim/init.vim
Normal file
@@ -0,0 +1,5 @@
|
||||
set runtimepath^=~/.vim runtimepath+=~/.vim/after
|
||||
|
||||
let &packpath = &runtimepath
|
||||
|
||||
source ~/.vimrc
|
||||
112
roles/init-server/templates/vimrc.j2
Normal file
112
roles/init-server/templates/vimrc.j2
Normal file
@@ -0,0 +1,112 @@
|
||||
" Disable compatibility with vi which can cause unexpected issues.
|
||||
set nocompatible
|
||||
|
||||
" Enable type file detection. Vim will be able to try to detect the type of file in use.
|
||||
filetype on
|
||||
|
||||
" Enable plugins and load plugin for the detected file type.
|
||||
filetype plugin on
|
||||
|
||||
" Load an indent file for the detected file type.
|
||||
filetype indent on
|
||||
|
||||
" Turn syntax highlighting on.
|
||||
syntax on
|
||||
|
||||
" Add numbers to each line on the left-hand side.
|
||||
set number
|
||||
|
||||
" Jump to line by relative number
|
||||
set relativenumber
|
||||
{% if (vim_blockedcursor | default(True)) %}
|
||||
|
||||
" Highlight cursor line underneath the cursor horizontally.
|
||||
set cursorline
|
||||
|
||||
" Highlight cursor line underneath the cursor vertically.
|
||||
set cursorcolumn
|
||||
{% endif %}
|
||||
{% if (vim_spatialize | default(True)) %}
|
||||
|
||||
" Use space characters instead of tabs.
|
||||
set expandtab
|
||||
|
||||
" Set tab width to 4 columns.
|
||||
set tabstop={{ vim_tabgap | default(2) }}
|
||||
{% endif %}
|
||||
|
||||
" While searching though a file incrementally highlight matching characters as you type.
|
||||
set incsearch
|
||||
|
||||
" Show the mode you are on the last line.
|
||||
set showmode
|
||||
|
||||
" Show matching words during a search.
|
||||
set showmatch
|
||||
|
||||
" Use highlighting when doing a search.
|
||||
set hlsearch
|
||||
|
||||
" Set the commands to save in history default number is 20.
|
||||
set history={{ vim_historyspan | default(20) }}
|
||||
{% if (vim_pathcompletion | default(True)) %}
|
||||
|
||||
" Enable auto completion menu after pressing TAB.
|
||||
set wildmenu
|
||||
|
||||
" Make wildmenu behave like similar to Bash completion.
|
||||
set wildmode=list:longest
|
||||
{% if vimignore is defined or vimignore != None %}
|
||||
|
||||
" There are certain files that we would never want to edit with Vim.
|
||||
" Wildmenu will ignore files with these extensions.
|
||||
set wildignore={{ vimignore | join(',') }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
" PLUGINS ----------------------------------------------------------------
|
||||
|
||||
" Plugin code goes here.
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
|
||||
Plug 'flazz/vim-colorschemes'
|
||||
{% if (vim_eddelimiters | default(True)) %}
|
||||
Plug 'tpope/vim-surround'
|
||||
{% endif %}
|
||||
{% if (vim_gitspice | default(True)) %}
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
{% endif %}
|
||||
{% if (vim_statusline | default(True)) %}
|
||||
Plug 'vim-airline/vim-airline'
|
||||
{% endif %}
|
||||
{% if (vim_fancycomment | default(True)) %}
|
||||
Plug 'scrooloose/nerdcommenter'
|
||||
{% endif %}
|
||||
{% if (vim_idelangs | default(True)) %}
|
||||
Plug 'dense-analysis/ale'
|
||||
{% endif %}
|
||||
|
||||
call plug#end()
|
||||
|
||||
" MAPPINGS ---------------------------------------------------------------
|
||||
|
||||
" Mappings code goes here.
|
||||
|
||||
" VIMSCRIPT --------------------------------------------------------------
|
||||
{% if (vim_origami | default(True)) %}
|
||||
|
||||
" This will enable code folding.
|
||||
" Use the marker method of folding.
|
||||
augroup filetype_vim
|
||||
autocmd!
|
||||
autocmd FileType vim setlocal foldmethod=marker
|
||||
augroup END
|
||||
{% endif %}
|
||||
|
||||
" More Vimscripts code goes here.
|
||||
|
||||
" STATUS LINE ------------------------------------------------------------
|
||||
|
||||
" Status bar code goes here.
|
||||
Reference in New Issue
Block a user