Add markdown plugin and settings

This commit is contained in:
Daniel Lynn 2021-07-14 16:06:10 -05:00
parent be6145e317
commit de109371fd
Signed by: daniel
GPG Key ID: 28496A140E180A9D
3 changed files with 31 additions and 6 deletions

17
nvim/markdown.vimrc Normal file
View File

@ -0,0 +1,17 @@
let g:vim_markdown_conceal = 2
let g:vim_markdown_conceal_code_blocks = 0
let g:vim_markdown_math = 1
let g:vim_markdown_toml_frontmatter = 1
let g:vim_markdown_frontmatter = 1
let g:vim_markdown_strikethrough = 1
let g:vim_markdown_autowrite = 1
let g:vim_markdown_edit_url_in = 'tab'
let g:vim_markdown_follow_anchor = 1
augroup CustomMarkdown
autocmd BufNewFile,BufRead *.md set filetype=markdown
autocmd FileType markdown Goyo
autocmd FileType markdown setlocal linebreak
autocmd FileType markdown setlocal nocursorline
autocmd FileType markdown setlocal nocursorcolumn
augroup END

View File

@ -3,6 +3,7 @@ Plug 'cespare/vim-toml'
Plug 'ctrlpvim/ctrlp.vim' Plug 'ctrlpvim/ctrlp.vim'
Plug 'honza/vim-snippets' Plug 'honza/vim-snippets'
Plug 'jiangmiao/auto-pairs' Plug 'jiangmiao/auto-pairs'
Plug 'junegunn/goyo.vim'
Plug 'leafgarland/typescript-vim' Plug 'leafgarland/typescript-vim'
Plug 'mileszs/ack.vim' Plug 'mileszs/ack.vim'
Plug 'posva/vim-vue' Plug 'posva/vim-vue'
@ -32,6 +33,10 @@ Plug 'preservim/nerdtree' |
\ Plug 'ryanoasis/vim-devicons' | \ Plug 'ryanoasis/vim-devicons' |
\ Plug 'tiagofumo/vim-nerdtree-syntax-highlight' \ Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
" Vim-Markdown
Plug 'godlygeek/tabular' |
\ Plug 'plasticboy/vim-markdown'
" sonokai colorscheme + supporting plugins " sonokai colorscheme + supporting plugins
Plug 'sainnhe/sonokai' | Plug 'sainnhe/sonokai' |
\ Plug 'rmolin88/pomodoro.vim' | \ Plug 'rmolin88/pomodoro.vim' |

15
vimrc
View File

@ -12,11 +12,12 @@ set encoding=utf-8
set expandtab set expandtab
set exrc set exrc
set fillchars=vert:▐ set fillchars=vert:▐
set foldlevelstart=1
set hidden set hidden
set history=50 set history=50
set incsearch set incsearch
set laststatus=2 set laststatus=2
set list listchars=tab:»·,trail,nbsp set listchars=tab:▸\ ,eol,nbsp:␣,trail:•,space:.,extends:→,precedes:←
set modelines=0 set modelines=0
set mouse=a set mouse=a
set nobackup set nobackup
@ -27,12 +28,14 @@ set nowritebackup
set number set number
set numberwidth=5 set numberwidth=5
set ruler set ruler
set scrolloff=12
set shiftround set shiftround
set shiftwidth=2 set shiftwidth=2
set shortmess+=c set shortmess+=c
set showbreak=·· set showbreak=··
set showcmd set showcmd
set signcolumn=yes set signcolumn=yes
set smartcase
set splitbelow set splitbelow
set splitright set splitright
set tabstop=2 set tabstop=2
@ -44,11 +47,6 @@ set ttyfast
set updatetime=300 set updatetime=300
set vb t_vb= set vb t_vb=
if has("nvim-0.5.0") || has("patch-8.1.1564")
" Recently vim can merge signcolumn and number column into one
set signcolumn=number
endif
syntax enable syntax enable
syntax sync minlines=128 maxlines=512 syntax sync minlines=128 maxlines=512
@ -104,6 +102,11 @@ if filereadable(expand("~/.config/nvim/test.vimrc"))
source ~/.config/nvim/test.vimrc source ~/.config/nvim/test.vimrc
endif endif
" Goyo setup
if filereadable(expand("~/.config/nvim/markdown.vimrc"))
source ~/.config/nvim/markdown.vimrc
endif
" Color setup " Color setup
if filereadable(expand("~/.config/nvim/colors.vimrc")) if filereadable(expand("~/.config/nvim/colors.vimrc"))
source ~/.config/nvim/colors.vimrc source ~/.config/nvim/colors.vimrc