Highlighted text search, use bufread instead of filetype
This commit is contained in:
parent
de109371fd
commit
eab0c33534
@ -16,8 +16,16 @@ noremap <Leader><Esc> :let @/ = ""<CR>
|
||||
" Spellcheck
|
||||
nnoremap <Leader>S :setlocal spell! spelllang=en_us<CR>
|
||||
|
||||
" Easy motion to start/end of a line
|
||||
noremap H ^
|
||||
noremap L $
|
||||
|
||||
" Toggle cursorline and relativelinenumber quickly
|
||||
noremap <Leader>c :set cursorline!<CR>
|
||||
noremap <Leader>n :set relativenumber!<CR>
|
||||
|
||||
" Oops, forgot a semi-colon...
|
||||
noremap <Leader>; $a;<Esc>
|
||||
|
||||
" Search highlighted text in buffer
|
||||
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
|
||||
|
@ -7,11 +7,12 @@ 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
|
||||
let g:goyo_linenr = 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
|
||||
autocmd BufNewFile,BufRead *.md Goyo
|
||||
autocmd BufNewFile,BufRead *.md setlocal linebreak
|
||||
autocmd BufNewFile,BufRead *.md setlocal nocursorline
|
||||
autocmd BufNewFile,BufRead *.md setlocal nocursorcolumn
|
||||
augroup END
|
||||
|
Loading…
x
Reference in New Issue
Block a user