matveyt / vimfiles Goto Github PK
View Code? Open in Web Editor NEWMy personal Vim configuration
My personal Vim configuration
I found this code in your answer of vi.stackexchange post
https://vi.stackexchange.com/a/22327/36876
if has('nvim')
augroup terminal_setup | au!
autocmd TermOpen * nnoremap <buffer><LeftRelease> <LeftRelease>i
" more stuff
augroup end
endif
Can you make this code compatible with mizlan's cp.vim?
source link
" for detecting OS
if !exists("g:os")
if has("win64") || has("win32") || has("win16")
let g:os = "Windows"
else
let g:os = substitute(system('uname'), '\n', '', '')
endif
endif
" available options:
" * g:split_term_style
" * g:split_term_resize_cmd
function! TermWrapper(command) abort
if !exists('g:split_term_style') | let g:split_term_style = 'vertical' | endif
if g:split_term_style ==# 'vertical'
let buffercmd = 'vnew'
elseif g:split_term_style ==# 'horizontal'
let buffercmd = 'new'
else
echoerr 'ERROR! g:split_term_style is not a valid value (must be ''horizontal'' or ''vertical'' but is currently set to ''' . g:split_term_style . ''')'
throw 'ERROR! g:split_term_style is not a valid value (must be ''horizontal'' or ''vertical'')'
endif
if exists('g:split_term_resize_cmd')
exec g:split_term_resize_cmd
endif
exec buffercmd
exec 'term ' . a:command
exec 'setlocal nornu nonu'
exec 'startinsert'
autocmd BufEnter <buffer> startinsert
endfunction
command! -nargs=0 CompileAndRun call TermWrapper(printf('g++ -std=c++11 %s && ./a.out', expand('%')))
command! -nargs=1 CompileAndRunWithFile call TermWrapper(printf('g++ -std=c++11 %s && ./a.out < %s', expand('%'), <args>))
autocmd FileType cpp nnoremap <F10> :CompileAndRun<CR>
let g:split_term_style = 'horizontal'
set splitbelow
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.