Skip to content

Instantly share code, notes, and snippets.

@JasonLABS
Last active September 30, 2019 21:23
Show Gist options
  • Save JasonLABS/6989eb2e07d72892f227a22285ed438b to your computer and use it in GitHub Desktop.
Save JasonLABS/6989eb2e07d72892f227a22285ed438b to your computer and use it in GitHub Desktop.
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
"
" Tutorial - https://github.com/junegunn/vim-plug/wiki/tutorial
" To install, paste plug
" :source /home/jason/.config/nvim/init.vim | (or restart nvim)
" :PlugInstall
"
" To Delete
" Comment out or delete Plug line
" :PlugClean
call plug#begin('~/.local/share/nvim/plugged')
Plug 'mhartington/oceanic-next'
Plug 'othree/html5.vim' "for OceanicNext colorscheme
Plug 'othree/yajs.vim' "for OceanicNext colorscheme
Plug 'HerringtonDarkholme/yats.vim/' "for OceanicNext Colorscheme
Plug 'scrooloose/nerdtree' "Installing NerdTree
Plug 'neoclide/coc.nvim', {'branch': 'release'} "Code Completion
call plug#end()
""" VIM hints and options
""" https://aonemd.github.io/blog/handy-keymaps-in-vim
""" Remap leader key to ,
let mapleader=","
""" save current buffer
nnoremap <leader>w :w<cr>
""" Color Scheme Settings for oceanic - START
colorscheme OceanicNext
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
if (has("termguicolors"))
set termguicolors
endif
syntax enable
""" Color Scheme Settings for oceanic - END
""" html5.vim settings - START
let g:html5_event_handler_attributes_complete = 0
let g:html5_rdfa_attributes_complete = 0
let g:html5_microdata_attributes_complete = 0
let g:html5_aria_attributes_complete = 0
""" html5.vim settings - END
""" yats.vim settings - START
let g:yats_host_keyword = 1
""" yats.vim settings - END
" basics
set number
""" This maps the enter key to push line down on view mode on Enter key
nmap <S-Enter> O<Esc>j
nmap <CR> o<Esc>k <Paste>
""" Spell Checking Highlight Color Settings
"""https://stackoverflow.com/questions/6008921/how-do-i-change-the-highlight-style-in-vim-spellcheck
hi clear SpellBad
hi SpellBad cterm=underline
""" Removes the highlight (no hilight) from searches
set nohlsearch
""" maps the captial Y to copy whole line
noremap Y y$
""" this creates an underline for misspelled words on documents
hi clear SpellBad
hi SpellBad cterm=underline
""" Inserts datetime stamp on insert mode
""" http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1)
""" http://vim.wikia.com/wiki/Insert_current_date_or_time
map! <F2> <C-R>=strftime('%Y-%m-%d %H:%M:%S %a')<CR>
""" Maping jj to exit insert mode
inoremap jj <ESC>
""" Case insensitive search set
""" I can use \C to do a case-sensitive search
""" Regular use: You need to use the \c escape sequence. So: /\ccopyright
set ignorecase
""" Set yanking to always go to system clipboard
""" This needs to have something like 'xsel' installed
""" Ubuntu 18.04 - sudo apt install xsel
set clipboard+=unnamedplus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment