4,461
edits
Tag: visualeditor-switched |
Tag: visualeditor |
||
Line 125: | Line 125: | ||
autocmd FileType php vnoremap <C-p> :call PhpDocRange()<CR> | autocmd FileType php vnoremap <C-p> :call PhpDocRange()<CR> | ||
</source> | </source> | ||
=== awesome-vim === | |||
For a preset of VIM development environment, awesome-vim is okay:<source lang="bash"> | |||
$ git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime | |||
$ sh ~/.vim_runtime/install_awesome_vimrc.sh | |||
</source># Run inside vim: -- this will let you click and drag panes to resize or jump between (learning vim more and being able to jump panes | |||
<nowiki>#</nowiki> makes this unecessary, but i'm not that good yet.) | |||
<nowiki>:</nowiki>set mouse=a | |||
<nowiki>#</nowiki> So now some sections on easy key commands/shortcuts | |||
<nowiki>##</nowiki> Splitting VIM screen Horizontally and Vertically | |||
To open a new VIM window next to the existing one, press <Ctrl>+<w> then press <v>. | |||
<nowiki>##</nowiki> Move panes around vim (left/right or top/bottom) | |||
Ctrl w + L - Move the current window to the "far right" | |||
Ctrl w + H - Move the current window to the "far left" | |||
Ctrl w + J - Move the current window to the "very bottom" | |||
Ctrl w + K - Move the current window to the "very top" | |||
<nowiki>##</nowiki> Copying everything into clipboard | |||
gg"*yG | |||
<nowiki>##</nowiki> Indenting all the code | |||
<nowiki>#</nowiki> Still need to look into a more serious formatter like: | |||
<nowiki>https://github.com/vim-autoformat/vim-autoformat</nowiki> | |||
gg=G | |||
<nowiki>#</nowiki> AwesomeVIM Leader Key Shortcut | |||
You'll see vim plugins mention <leader>, that <leader> for awesome view is "," so whenever you see leader hit that key. | |||
<nowiki>##</nowiki> phpunit | |||
<nowiki>###</nowiki> Set the path of phpunit (most cases for me, vendor/bin/phpunit) | |||
let g:phpunit_bin = 'phpunit' | |||
<nowiki>###</nowiki> Shortcuts | |||
<leader>ta - Run all test cases | |||
<leader>ts - Switch between source & test file | |||
<leader>tf - Run current test case class | |||
<nowiki>#</nowiki> Folding | |||
`zo` to open folding | |||
`zc` to close folding | |||
<nowiki>#</nowiki> NerdTREE | |||
<leader>nn - Toggles NerdTREE | |||
While inside NerdTREE hit "m" to do a number of modifications from renaming, deleting or adding files. | |||
== Set up environment for web development == | == Set up environment for web development == |