Skip to content

mizlan/vim-and-cp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-and-cp

Some helpful bits and pieces for your vimrc

compiling

:CompileAndRun

Using a file as input, for example input.txt

:CompileAndRunWithFile "input.txt"

To compile and run separately, you can use the following command definitions:

command! -nargs=0 Compile call TermWrapper(printf('g++ -std=c++11 %s', expand('%')))
command! -nargs=0 Run call TermWrapper('./a.out')

These commands can be mapped to keys of your choice, for example:

autocmd FileType cpp nnoremap <leader>fw :CompileAndRun<CR>

options

Choose between 'vertical' and 'horizontal' for how the terminal window is split (default is vertical)

let g:split_term_style = 'horizontal'

Add a custom command to resize the terminal window to your preference (default is to split the screen equally)

let g:split_term_resize_cmd = 'resize 6'

About

Some helpful bits and pieces for your vimrc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published