-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.vim.old
78 lines (64 loc) · 2.08 KB
/
init.vim.old
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
" vim/neovim config used by Nikita Pupko
" Author: Nikita Pupko
" http://github.com/npupko/dotfiles
" General Config {{{
lua require('init2')
" map <leader>cle :call CopyLinterError()<CR>
"
" function! CopyLinterError()
" redir @+
" 1message
" redir END
" endfunction
" nnoremap <leader>v :e $MYVIMRC<CR>
" nnoremap <leader><c-v> :e /Users/random/.config/nvim/lua/plugins.lua<CR>
" nnoremap <leader>V :source $MYVIMRC<CR>
" nnoremap <leader>un :syntax sync fromstart<CR>:redraw!<CR>
" nnoremap <leader>fef :normal! gg=G``<CR>
" nnoremap <C-k> <C-w><Up>
" nnoremap <C-j> <C-w><Down>
" nnoremap <C-l> <C-w><Right>
" nnoremap <C-h> <C-w><Left>
" nnoremap _cs :setlocal filetype=css<CR>
" nnoremap _co :setlocal filetype=coffee<CR>
" nnoremap _ht :setlocal filetype=html<CR>
" nnoremap _sl :setlocal filetype=slim<CR>
" nnoremap _js :setlocal filetype=javascript<CR>
" nnoremap _md :setlocal filetype=markdown<CR>
" nnoremap _rb :setlocal filetype=ruby<CR>
" nnoremap _sh :setlocal filetype=sh<CR>
" nnoremap _vi :setlocal filetype=vim<CR>
" nnoremap _an :setlocal filetype=yaml.ansible<CR>
" nnoremap _dc :setlocal filetype=dockerfile<CR>
map <leader>cs :call CreateSpec()<CR>
function! CreateSpec()
" This function requires tpope/rails.vim
let l:file_path = expand('%')
let l:spec_path = substitute(l:file_path, '\vapp\/(.+)\.rb', '\1', '')
echo 'Espec ' . l:spec_path . '!'
execute 'Espec ' . l:spec_path . '!'
endfunction
" let g:elite_mode = 1
" if get(g:, 'elite_mode')
" nnoremap <Up> :resize +2<CR>
" nnoremap <Down> :resize -2<CR>
" nnoremap <Left> :vertical resize +2<CR>
" nnoremap <Right> :vertical resize -2<CR>
" endif
" if has('nvim')
" tmap <C-o> <C-\><C-n>
" end
vnoremap // y/<C-R>"<CR>
nnoremap <silent> // :nohlsearch<CR>
inoremap <C-c> <Esc><Esc>
map <leader>/ :call AddPry()<CR>
function! AddPry()
if &filetype == 'ruby'
execute "normal obinding.pry\<Esc>"
elseif &filetype == 'svelte' || &filetype == 'js' || &filetype == 'ts'
execute "normal odebugger\<Esc>"
else
execute "normal obinding.pry\<Esc>"
end
endfunction
" vim:foldmethod=marker: