Skip to content

Instantly share code, notes, and snippets.

@tradingbills
Last active June 3, 2019 22:06
Show Gist options
  • Save tradingbills/c067554b915c44f0240f87d1735b80cc to your computer and use it in GitHub Desktop.
Save tradingbills/c067554b915c44f0240f87d1735b80cc to your computer and use it in GitHub Desktop.
vimrc
let NERDTreeShowHidden=1
let g:user_emmet_leader_key=','
nnoremap <Leader>q" ciw""<Esc>P
nnoremap <Leader>q' ciw''<Esc>P
nnoremap <Leader>qd daW"=substitute(@@,"'\\\|\"","""","g""")<CR>P
set splitright
nmap <F6> :NERDTreeToggle<CR>
"This allows buffers to be hidden if you've modified a buffer.
"This is almost a must if you wish to use buffers in this way.
set hidden
" To open a new empty buffer
" This replaces :tabnew which I used to bind to this mapping
nmap <leader>T :enew<cr>
" Move to the next buffer
nmap <leader>l :bnext<CR>
" Move to the previous buffer
nmap <leader>h :bprevious<CR>
" Close the current buffer and move to the previous one
" This replicates the idea of closing a tab
nmap <leader>bq :bp <BAR> bd #<CR>
" Show all open buffers and their status
nmap <leader>bl :ls<CR>"
"buffers to be hidden if you've modified a buffer.
"buffers to be hidden if you've modified a buffer. " This is almost a must if you wish to use buffers in this way.
set hidden
" To open a new empty buffer
" This replaces :tabnew which I used to bind to this mapping
nmap <leader>T :enew<cr>
" Move to the next buffer
nmap <leader>l :bnext<CR>
" Move to the previous buffer
nmap <leader>h :bprevious<CR>
" Close the current buffer and move to the previous one
" This replicates the idea of closing a tab
nmap <leader>bq :bp <BAR> bd #<CR>
" Show all open buffers and their status
nmap <leader>bl :ls<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment