aboutsummaryrefslogtreecommitdiff
path: root/after
diff options
context:
space:
mode:
Diffstat (limited to 'after')
-rw-r--r--after/ftplugin/cpp.vim39
-rw-r--r--after/ftplugin/gitconfig.vim1
-rw-r--r--after/ftplugin/javascript.vim3
-rw-r--r--after/ftplugin/json.vim6
-rw-r--r--after/ftplugin/lua.vim8
-rw-r--r--after/ftplugin/markdown.vim69
-rw-r--r--after/ftplugin/python.vim17
-rw-r--r--after/ftplugin/qf.vim6
-rw-r--r--after/ftplugin/sql.vim1
-rw-r--r--after/ftplugin/tex.lua2
-rw-r--r--after/ftplugin/text.vim1
-rw-r--r--after/ftplugin/toml.vim0
-rw-r--r--after/ftplugin/vim.vim15
-rw-r--r--after/ftplugin/yaml.vim4
14 files changed, 0 insertions, 172 deletions
diff --git a/after/ftplugin/cpp.vim b/after/ftplugin/cpp.vim
deleted file mode 100644
index a8f76f3..0000000
--- a/after/ftplugin/cpp.vim
+++ /dev/null
@@ -1,39 +0,0 @@
-set commentstring=//\ %s
-
-" Disable inserting comment leader after hitting o or O or <Enter>
-set formatoptions-=o
-set formatoptions-=r
-
-nnoremap <silent> <buffer> <F9> :call <SID>compile_run_cpp()<CR>
-
-function! s:compile_run_cpp() abort
- let src_path = expand('%:p:~')
- let src_noext = expand('%:p:~:r')
- " The building flags
- let _flag = '-Wall -Wextra -std=c++11 -O2'
-
- if executable('clang++')
- let prog = 'clang++'
- elseif executable('g++')
- let prog = 'g++'
- else
- echoerr 'No C++ compiler found on the system!'
- endif
- call s:create_term_buf('h', 20)
- execute printf('term %s %s %s -o %s && %s', prog, _flag, src_path, src_noext, src_noext)
- startinsert
-endfunction
-
-function s:create_term_buf(_type, size) abort
- set splitbelow
- set splitright
- if a:_type ==# 'v'
- vnew
- else
- new
- endif
- execute 'resize ' . a:size
-endfunction
-
-" For delimitMate
-let b:delimitMate_matchpairs = "(:),[:],{:}"
diff --git a/after/ftplugin/gitconfig.vim b/after/ftplugin/gitconfig.vim
deleted file mode 100644
index 9c2e80a..0000000
--- a/after/ftplugin/gitconfig.vim
+++ /dev/null
@@ -1 +0,0 @@
-set commentstring=#\ %s
diff --git a/after/ftplugin/javascript.vim b/after/ftplugin/javascript.vim
deleted file mode 100644
index 3e27ee8..0000000
--- a/after/ftplugin/javascript.vim
+++ /dev/null
@@ -1,3 +0,0 @@
-" Disable inserting comment leader after hitting o or O or <Enter>
-set formatoptions-=o
-set formatoptions-=r
diff --git a/after/ftplugin/json.vim b/after/ftplugin/json.vim
deleted file mode 100644
index 90db3ec..0000000
--- a/after/ftplugin/json.vim
+++ /dev/null
@@ -1,6 +0,0 @@
-" let the initial folding state be that all folds are closed.
-set foldlevel=0
-
-" Use nvim-treesitter for folding
-set foldmethod=expr
-set foldexpr=nvim_treesitter#foldexpr()
diff --git a/after/ftplugin/lua.vim b/after/ftplugin/lua.vim
deleted file mode 100644
index 73b1a8f..0000000
--- a/after/ftplugin/lua.vim
+++ /dev/null
@@ -1,8 +0,0 @@
-" Disable inserting comment leader after hitting o or O or <Enter>
-set formatoptions-=o
-set formatoptions-=r
-
-nnoremap <buffer><silent> <F9> :luafile %<CR>
-
-" For delimitMate
-let b:delimitMate_matchpairs = "(:),[:],{:}"
diff --git a/after/ftplugin/markdown.vim b/after/ftplugin/markdown.vim
deleted file mode 100644
index efea5e5..0000000
--- a/after/ftplugin/markdown.vim
+++ /dev/null
@@ -1,69 +0,0 @@
-set concealcursor=c
-set synmaxcol=3000 " For long Chinese paragraphs
-
-set wrap
-
-" Fix minor issue with footnote, see https://github.com/vim-pandoc/vim-markdownfootnotes/issues/22
-if exists(':FootnoteNumber')
- nnoremap <buffer><silent> ^^ :<C-U>call markdownfootnotes#VimFootnotes('i')<CR>
- inoremap <buffer><silent> ^^ <C-O>:<C-U>call markdownfootnotes#VimFootnotes('i')<CR>
- imap <buffer> <silent> @@ <Plug>ReturnFromFootnote
- nmap <buffer> <silent> @@ <Plug>ReturnFromFootnote
-endif
-
-" Text objects for Markdown code blocks.
-xnoremap <buffer><silent> ic :<C-U>call text_obj#MdCodeBlock('i')<CR>
-xnoremap <buffer><silent> ac :<C-U>call text_obj#MdCodeBlock('a')<CR>
-onoremap <buffer><silent> ic :<C-U>call text_obj#MdCodeBlock('i')<CR>
-onoremap <buffer><silent> ac :<C-U>call text_obj#MdCodeBlock('a')<CR>
-
-" Use + to turn several lines to an unordered list.
-" Ref: https://vi.stackexchange.com/q/5495/15292 and https://stackoverflow.com/q/42438795/6064933.
-nnoremap <buffer><silent> + :set operatorfunc=AddListSymbol<CR>g@
-xnoremap <buffer><silent> + :<C-U> call AddListSymbol(visualmode(), 1)<CR>
-
-function! AddListSymbol(type, ...) abort
- if a:0
- let line_start = line("'<")
- let line_end = line("'>")
- else
- let line_start = line("'[")
- let line_end = line("']")
- endif
-
- " add list symbol to each line
- for line in range(line_start, line_end)
- let text = getline(line)
-
- let l:end = matchend(text, '^\s*')
- if l:end == 0
- let new_text = '+ ' . text
- else
- let new_text = text[0 : l:end-1] . ' + ' . text[l:end :]
- endif
-
- call setline(line, new_text)
- endfor
-endfunction
-
-" Add hard line breaks for Markdown
-nnoremap <buffer><silent> \ :set operatorfunc=AddLineBreak<CR>g@
-xnoremap <buffer><silent> \ :<C-U> call AddLineBreak(visualmode(), 1)<CR>
-
-function! AddLineBreak(type, ...) abort
- if a:0
- let line_start = line("'<")
- let line_end = line("'>")
- else
- let line_start = line("'[")
- let line_end = line("']")
- endif
-
- for line in range(line_start, line_end)
- let text = getline(line)
- " add backslash to each line
- let new_text = text . "\\"
-
- call setline(line, new_text)
- endfor
-endfunction
diff --git a/after/ftplugin/python.vim b/after/ftplugin/python.vim
deleted file mode 100644
index 185aa6e..0000000
--- a/after/ftplugin/python.vim
+++ /dev/null
@@ -1,17 +0,0 @@
-if exists(':AsyncRun')
- nnoremap <buffer><silent> <F9> :<C-U>AsyncRun python -u "%"<CR>
-endif
-
-" Do not wrap Python source code.
-set nowrap
-set sidescroll=5
-set sidescrolloff=2
-set colorcolumn=100
-
-set tabstop=4 " number of visual spaces per TAB
-set softtabstop=4 " number of spaces in tab when editing
-set shiftwidth=4 " number of spaces to use for autoindent
-set expandtab " expand tab to spaces so that tabs are spaces
-
-" For delimitMate
-let b:delimitMate_matchpairs = "(:),[:],{:}"
diff --git a/after/ftplugin/qf.vim b/after/ftplugin/qf.vim
deleted file mode 100644
index 89b4c1f..0000000
--- a/after/ftplugin/qf.vim
+++ /dev/null
@@ -1,6 +0,0 @@
-" Set quickfix window height, see also https://github.com/lervag/vimtex/issues/1127
-function! AdjustWindowHeight(minheight, maxheight)
- execute max([a:minheight, min([line('$'), a:maxheight])]) . 'wincmd _'
-endfunction
-
-call AdjustWindowHeight(5, 15)
diff --git a/after/ftplugin/sql.vim b/after/ftplugin/sql.vim
deleted file mode 100644
index 8c0d563..0000000
--- a/after/ftplugin/sql.vim
+++ /dev/null
@@ -1 +0,0 @@
-set commentstring=--\ %s
diff --git a/after/ftplugin/tex.lua b/after/ftplugin/tex.lua
deleted file mode 100644
index a11226a..0000000
--- a/after/ftplugin/tex.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-vim.o.textwidth = 120
-vim.o.wrap = true
diff --git a/after/ftplugin/text.vim b/after/ftplugin/text.vim
deleted file mode 100644
index 0dfe4de..0000000
--- a/after/ftplugin/text.vim
+++ /dev/null
@@ -1 +0,0 @@
-set colorcolumn=
diff --git a/after/ftplugin/toml.vim b/after/ftplugin/toml.vim
deleted file mode 100644
index e69de29..0000000
--- a/after/ftplugin/toml.vim
+++ /dev/null
diff --git a/after/ftplugin/vim.vim b/after/ftplugin/vim.vim
deleted file mode 100644
index 17dcedb..0000000
--- a/after/ftplugin/vim.vim
+++ /dev/null
@@ -1,15 +0,0 @@
-" Disable inserting comment leader after hitting o or O or <Enter>
-set formatoptions-=o
-set formatoptions-=r
-
-" Set the folding related options for vim script. Setting folding option in
-" modeline is annoying in that the modeline get executed each time the window
-" focus is lost (see
-" https://github.com/tmux-plugins/vim-tmux-focus-events/issues/14)
-set foldmethod=expr foldexpr=utils#VimFolds(v:lnum) foldtext=utils#MyFoldText()
-
-" Use :help command for keyword when pressing `K` in vim file,
-" see `:h K` and https://stackoverflow.com/q/15867323/6064933
-set keywordprg=:help
-
-nnoremap <buffer><silent> <F9> :source %<CR>
diff --git a/after/ftplugin/yaml.vim b/after/ftplugin/yaml.vim
deleted file mode 100644
index ad695d7..0000000
--- a/after/ftplugin/yaml.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Turn off syntax highlighting for large YAML files.
-if line('$') > 500
- setlocal syntax=OFF
-endif