forked from lockshaw/ff-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
132 lines (113 loc) · 3.65 KB
/
.vimrc
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
"echom 'Loading .vimrc'
" augroup ff_cpp
" autocmd!
" autocmd FileType cpp set tabstop=2 shiftwidth=2 expandtab
" autocmd FileType cpp set cino+=g0
" augroup END
" augroup ff_bash
" autocmd!
" autocmd FileType sh set tabstop=2 shiftwidth=2 expandtab
" augroup END
" augroup ff_vimscript
" autocmd!
" autocmd FileType vim set tabstop=2 shiftwidth=2 expandtab
" augroup END
" augroup ff_cmake
" autocmd!
" autocmd FileType cmake set tabstop=2 shiftwidth=2 expandtab
" augroup END
" compiler gcc
" set makeprg=cd\ build\ &&\ make
" function! GetMyPath()
" return fnamemodify(resolve(expand('<script>:p')), ':h')
" endfunction
" function! FixTerm()
" 1Tkill
" 1Tclear!
" endfunction
" let g:mydir = $MYDIR
" let g:buildpath = $MYDIR .. "/build/"
" if !exists("g:target")
" if exists("g:test_target")
" let g:target = g:test_target
" else
" let g:target = "all"
" endif
" endif
" if !exists("g:test_target")
" let g:test_target = g:target
" endif
" function! RunCmake()
" call FixTerm()
" exec '1T mkdir -p '..g:buildpath..
" \ ' && pushd '..g:buildpath..
" \ ' &&
" \ cmake
" \ -DCMAKE_CXX_FLAGS="-ftemplate-backtrace-limit=0"
" \ -DCMAKE_BUILD_TYPE=Debug
" \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
" \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
" \ -DFF_CUDA_ARCH=60
" \ -DCUDA_PATH="$(dirname $(which nvcc))/../"
" \ -DCMAKE_CUDA_ARCHITECTURES=60
" \ -DCMAKE_CXX_COMPILER="clang++"
" \ -DCMAKE_C_COMPILER="clang"
" \ -DCMAKE_CUDA_COMPILER="clang++"
" \ -DCMAKE_CUDA_HOST_COMPILER="clang++" ..
" \ && compdb -p . list > ../compile_commands.json;
" \ popd > /dev/null
" \ '
" endfunction
" function! Build()
" call FixTerm()
" exec '1T pushd '..g:buildpath..'
" \ && clear
" \ && CCACHE_BASEDIR=/home/lockshaw/hax/dev/ff make '..join(g:target, ' ')..' 2>&1;
" \ popd > /dev/null
" \ '
" endfunction
" function! Test()
" call FixTerm()
" exec '1T pushd '..g:buildpath..'
" \ && clear
" \ && CCACHE_BASEDIR=/home/lockshaw/hax/dev/ff make '..join(g:test_target, ' ')..' 2>&1
" \ && ctest --progress --output-on-failure -L "^'..join(g:test_target, '|')..'$";
" \ popd > /dev/null
" \ '
" endfunction
" function! SetTargets(...)
" let g:target = a:000
" let g:test_target = g:target
" endfunction
" function! AddTargets(...)
" let g:target += a:000
" let g:test_target += a:000
" endfunction
" function! ListTargets(A,L,P)
" return system("cd "..g:buildpath.." && make help | tail -n +3 | cut -c 5- | grep '^[a-z]' | grep -v '^clean'")
" endfun
" command! -complete=custom,ListTargets -nargs=* SetTargets :call SetTargets(<f-args>)
" command! -complete=custom,ListTargets -nargs=* AddTargets :call AddTargets(<f-args>)
" command! ShowTargets :echom g:target
" function! Fix()
" lua vim.lsp.buf.code_action()
" endfunction
" let s:snippets_dir = GetMyPath() .. '/.snippets/'
" let g:UltiSnipsEditSplit = "context"
" let g:UltiSnipsSnippetStorageDirectoryForUltiSnipsEdit = s:snippets_dir
" let g:UltiSnipsSnippetDirectories=[s:snippets_dir]
" let g:UltiSnipsExpandTrigger = '<c-g>'
" " let g:UltiSnipsExpandTrigger = "<tab>"
" let g:UltiSnipsListSnippets = "<c-tab>"
" let g:UltiSnipsJumpForwardTrigger = "<c-f>"
" let g:UltiSnipsJumpBackwardTrigger = "<c-F>"
"
"
" let g:UltiSnipsJumpForwardTrigger = '<C-f>'
" let g:UltiSnipsJumpBackwardTrigger = '<C-F>'
" let g:UltiSnipsListSnippets = '<C-E>'
" nnoremap BB :call Build()<CR>
" nnoremap TT :call Test()<CR>
" command! RunCmake :call RunCmake()
" command! Fix :call Fix()
" nnoremap <leader>f :call Fix()<CR>