1
0
mirror of https://github.com/amix/vimrc synced 2025-07-07 00:15:00 +08:00

Merge pull request #6 from amix/master

Merge with develop
This commit is contained in:
Jaeguk Hyun
2022-10-23 01:18:05 +09:00
committed by GitHub
39 changed files with 457 additions and 120 deletions

View File

@ -135,6 +135,9 @@ set foldcolumn=1
" Enable syntax highlighting
syntax enable
" Set regular expression engine automatically
set regexpengine=0
" Enable 256 colors palette in Gnome Terminal
if $COLORTERM == 'gnome-terminal'
set t_Co=256
@ -232,17 +235,17 @@ map <leader>tn :tabnew<cr>
map <leader>to :tabonly<cr>
map <leader>tc :tabclose<cr>
map <leader>tm :tabmove
map <leader>t<leader> :tabnext
map <leader>t<leader> :tabnext<cr>
" Let 'tl' toggle between this and the last accessed tab
let g:lasttab = 1
nmap <Leader>tl :exe "tabn ".g:lasttab<CR>
nmap <leader>tl :exe "tabn ".g:lasttab<CR>
au TabLeave * let g:lasttab = tabpagenr()
" Opens a new tab with the current buffer's path
" Super useful when editing files in the same directory
map <leader>te :tabedit <C-r>=expand("%:p:h")<cr>/
map <leader>te :tabedit <C-r>=escape(expand("%:p:h"), " ")<cr>/
" Switch CWD to the directory of the open buffer
map <leader>cd :cd %:p:h<cr>:pwd<cr>

View File

@ -1,6 +1,6 @@
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Important:
" This requries that you install https://github.com/amix/vimrc !
" This requires that you install https://github.com/amix/vimrc !
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@ -180,7 +180,7 @@ func! DeleteTillSlash()
endfunc
func! CurrentFileDir(cmd)
return a:cmd . " " . expand("%:p:h") . "/"
return a:cmd . " " . escape(expand("%:p:h"), " ") . "/"
endfunc
"=================================================================================

View File

@ -78,3 +78,9 @@ autocmd BufRead *.twig set syntax=html filetype=html
" => Markdown
""""""""""""""""""""""""""""""
let vim_markdown_folding_disabled = 1
""""""""""""""""""""""""""""""
" => YAML
""""""""""""""""""""""""""""""
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab

View File

@ -199,7 +199,7 @@ let g:EditorConfig_exclude_patterns = ['fugitive://.*']
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Copy the link to the line of a Git repository to the clipboard
nnoremap <leader>v :.GBrowse!<CR>
xnoremap <leader>v :'<'>GBrowse!<CR>
xnoremap <leader>v :GBrowse!<CR>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""