~aritra1911/dotfiles

cfa6d331e0dec77572d6a735b0cb12dd1bf523a0 — Aritra Sarkar 2 years ago 42a8cc4
Add Neovim's init.vim
2 files changed, 76 insertions(+), 2 deletions(-)

A dotfiles/.config/nvim/init.vim
M stage.sh
A dotfiles/.config/nvim/init.vim => dotfiles/.config/nvim/init.vim +67 -0
@@ 0,0 1,67 @@
call plug#begin('~/.vim/plugged')
Plug 'octol/vim-cpp-enhanced-highlight'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'tpope/vim-fugitive'
"Plug 'ryanoasis/vim-devicons'  " Keep at the end
call plug#end()

set showmatch           " Show matching brackets.
set number
set formatoptions+=o    " Continue comment marker in new lines.
set smarttab
set cindent
set tabstop=4
set shiftwidth=4
" always uses spaces instead of tab characters
set expandtab
set textwidth=120
set nojoinspaces        " Prevents inserting two spaces after punctuation on a join (J)
highlight Comment cterm=italic

let g:airline_theme='base16_default'
let g:airline_left_sep = ''
let g:airline_left_alt_sep = '|'
let g:airline_right_sep = ''
let g:airline_right_alt_sep = '|'

"--- http://nerditya.com/code/guide-to-neovim/ ---
" More natural splits
    set splitbelow          " Horizontal split below current.
    "set splitright          " Vertical split to right of current.

    if !&scrolloff
        set scrolloff=3       " Show next 3 lines while scrolling.
    endif
    if !&sidescrolloff
        set sidescrolloff=5   " Show next 5 columns while side-scrolling.
    endif
    set nostartofline       " Do not jump to first character with page commands.

set ignorecase          " Make searching case insensitive
set smartcase           " ... unless the query has capital letters.

" Map the leader key to SPACE
let mapleader="\<SPACE>"

" Also highlight all tabs and trailing whitespace characters.
highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
match ExtraWhitespace /\s\+$/

" Use <C-L> to clear the highlighting of :set hlsearch.
if maparg('<C-L>', 'n') ==# ''
  nnoremap <silent> <C-L> :nohlsearch<CR><C-L>
endif

" Relative numbering
function! NumberToggle()
  if(&relativenumber == 1)
    set nornu
    set number
  else
    set rnu
  endif
endfunc

" Toggle between normal and relative numbering.
nnoremap <leader>r :call NumberToggle()<cr>

M stage.sh => stage.sh +9 -2
@@ 15,8 15,8 @@ fi
PICOM_CONF_DIR="picom"
PICOM_CONF="picom.conf"
mkdir -p "$DOTFILES_CONFIG_DIR/$PICOM_CONF_DIR"
cp "$XDG_CONFIG_HOME/$PICOM_CONF_DIR/$PICOM_CONF" \
   "$DOTFILES_CONFIG_DIR/$PICOM_CONF_DIR/$PICOM_CONF"
cp  "$XDG_CONFIG_HOME/$PICOM_CONF_DIR/$PICOM_CONF" \
    "$DOTFILES_CONFIG_DIR/$PICOM_CONF_DIR/$PICOM_CONF"

# Irssi
IRSSI_CONFIG_DIR=".irssi"


@@ 29,3 29,10 @@ sed 's/password = ".*"/password = "password"/;
     s/user_name = ".*"/user_name = "user_name"/;' \
    "$HOME/$IRSSI_CONFIG_DIR/$IRSSI_CONFIG" > \
    "$DOTFILES_HOME_DIR/$IRSSI_CONFIG_DIR/$IRSSI_CONFIG"

# Neovim
NVIM_INIT_VIM_DIR="nvim"
NVIM_INIT_VIM="init.vim"
mkdir -p "$DOTFILES_CONFIG_DIR/$NVIM_INIT_VIM_DIR"
cp  "$XDG_CONFIG_HOME/$NVIM_INIT_VIM_DIR/$NVIM_INIT_VIM" \
    "$DOTFILES_CONFIG_DIR/$NVIM_INIT_VIM_DIR/$NVIM_INIT_VIM"