Sunday, March 30, 2014

vim usage quiz - level 3 Better, Stronger, Faster

Just want to help remembering commands. Answers are in this good article, Learn Vim Progressively.

Better

1. How to repeat the last command?
2. How to repeat a command and specify the number of repetitions?

Stronger

3. How to move cursor to  a specified number of row?
4. How to go to start line of the file?
5. How to go to the last line of the file?

6. How to go to the start of following word (regard a punctuation mark as a single word)?
7. How to go to the end of this word (regard a punctuation mark as a single word)?
8. How to go to the start of following word (the word includes punctuation marks)?
9. How to go to the end of this word (the word includes punctuation marks)?

10. How to go to the corresponding round brackets, square brackets and braces?

Faster

11. How to execute a command from a specified start position to a specified end position? 
      A command format.



Friday, March 28, 2014

vim usage quiz - level 2 Feel comfortable

Just want to help remembering commands. Answers are in this good article, Learn Vim Progressively.

1. How to insert after current cursor?
2. How to insert a new line after the current one?
3. How to insert a new line before current one?
4. How to replace the characters from current cursor to the end of this word?
5. How to move cursor to the first column?
6. How to move cursor to the first non-blank character of the line?
7. How to move cursor to the end of the line?
8. How to move cursor to the last non-blank character of the line?

9. How to search for text from start to end?
10. How to search for text from end to start?
11. How to move to next occurrence forwards when searching for text from start to end?
12. How to move to next occurrence backwards when searching for text from start to end?
13. How to move to next occurrence forwards when searching for text from end to start?
14. How to move to next occurrence backwards when searching for text from end to start?

15. How to paste before current cursor?
16. How to copy the current line?
17. How to undo?
18. How to redo?
19. How to open another file?
20. how to save but don't quit currently editing file?
21. How to quit without saving?
22. How to show the next file in buffer?


vim usage quiz - level 1 Survive


Just want to help remembering commands. Answers are in this good article, Learn Vim Progressively.

1. How to go in insert mode?
2. How to return normal mode?
3. How to delete the character under cursor?
4. How to save and quit?
5. How to delete (and copy) the current line?
6. How to paste after current cursor?
7. How to move the cursor without using direction keys?
8. How to get help about command?

Tuesday, March 11, 2014

Solve javascript errors in Eclipse

When you import a java web project into eclipse at first time you may always get some JavaScripts errors like
If those files with errors are yours you may want to fix them. But practically in most instances the files come from some third party libraries. So that is impossible to fix them by yourself. Hiding those errors become the best or only choice.

Two ways:
1. Disable all validations: Window-->References-->Validation

Not only ignore those javascript errors but also accelerate your eclipse.

2. Exclude JavaScript files:
Right click project-->Properties-->JavaScript-->Include Path-->Source (Tab), modify the directory or add exclusion pattern. Anyway I have excluded all...