atomcoder : Atomcoder Development Environment
script karma |
Rating 6/3,
Downloaded by 1732 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Simon Chiu |
|
script type |
utility |
|
description |
Atomcoder Vim Scripts
Problem:
- with Vim map we cannot map "ab" if "a" is already mapped.
- with Vim map there is no chance for correction if we made a typo.
- with Vim map we need to prefix with Vim mapleader key as a lot of single characters are already mapped by default.
Solution:
- rename the mappings using underscore "_" as prefix and suffix.
- call a Vim command using argument like "java" or "javac" which in turns call a Vim function which calls the respective mapping.
- map the Vim command to a special key like Enter key <CR>
- after entering the argument like "java", press Enter key <CR> again to execute it
- we may be able extend this to allow passing parameters like "build" to execute an external "ant build" command instead of mapping each Ant target.
Enter Vim commands like game cheat codes, press Enter then type command. Commands are entered in command line and not as maps. This means you could correct typing mistakes before invoking the command.
Just my various Vim settings, mappings, functions for Java Programming.
Press Enter (<CR>) invokes ":Vim" prompt in command line. ":Vim" calls the "Vim" function. Then type "lc<CR>" to line comment the current line (or highlighted lines) of Java, Vim, XML code. "<CR>nlc<CR>" will uncomment it.
Some ":Vim" commands:
- tt - toggle tomcat
- tr - tomcat shutdown tomcat startup
- te - tomcat shutdown
- cvsd - cvs diff on current file
- cvsci - cvs ci
- cvsru - :del % then cvs up
- cvstF - cvs tag -F with hardcoded tag
- cvsup - cvs up
- cvsv - cvs up -p
- cvslga - cvs log
- cd - cd to directory containing current file
Some maps:
- <F8> - :!ant work-webapp
- <F9> - :!ant work-compile
- p - works more like mswin <C-V> when text is highlighted
- g/ - put current word in the "/ register so that a substring that matches it gets highligthed
- g? - put current word in the "/ register so that a word that matches it gets highligthed
- ZR :e!<CR>
- ZU :up<CR>
- ZZ <Nop>
- ZD :bd!<CR>
- ZC :bd<CR>
Java
- typing "sout" in insert mode will expand to "System.out.println();" with cursor put in between "()"
- "vmain" -> "public static void main(String[] args)"
- "pst" -> "printStackTrace()"
|
|
install details |
CVS commands requires Cygwin.
To Install: Put all .vim files into $VIM/vimfiles/plugin directory like "C:\Program Files (x86)\vim\vimfiles\plugin". Try not to delete this folder when upgrading to newer Vim version. |
|
script versions (upload new version)
Click on the package to download.
atomcoder.zip |
4 |
2017-07-26 |
8.0 |
Simon Chiu |
Added Run function mapped to F5. If filetype is vim, will source %. else execute a run.bat file in windows shell.
Code for run.bat: ..\\maven\\bin\\mvn clean package & choice /T 60 /D Y /M "Close (60s)" & if errorlevel 2 pause
|
atomcoder.zip |
3 |
2017-06-22 |
8.0 |
Simon Chiu |
merge gui_mswin.vim with environment.vim, rename environment.vim to atomcoder.vim, other files with atomcoder prefix
|
atomcoder-vim-2.zip |
2 |
2003-10-16 |
6.0 |
Simon Chiu |
Fix color for Windows Terminal Client. |
atomcoder-1.zip |
1 |
2002-08-09 |
6.0 |
Simon Chiu |
environment, java, cvs, local_mswin, gui_mswin |
ip used for rating: 13.59.111.209
|