Showing posts with label VIM. Show all posts
Showing posts with label VIM. Show all posts

Friday, April 17, 2020

pathogen.vim nerdtree


mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim


add in .vimrc

execute pathogen#infect()
syntax on
filetype plugin indent on


git clone https://github.com/preservim/nerdtree.git ~/.vim/bundle/nerdtree

reference:
https://github.com/tpope/vim-pathogen

Thursday, March 28, 2019

Java spring framework and dependency

I just had my refresher course for Java spring framework and it's really nice to be back again with Java. I find it that it's really improved from last used in Java way back in 2014. IDE is getting more better especially when using Eclipse.

I am using Spring tool suite now and it's really nice. One thing when working or coding into IDE I really like to use vim editor style. But now, I find this nice tool called vrapper http://vrapper.sourceforge.net/home/. You just install into the eclipse marketplace and that's it, boom, you have your vim style in your editor. sweet!

Another tool I just recently discovered is to have your clean code automatically formatted. I found this site http://www.eclipseonetips.com/2009/12/13/automatically-format-and-cleanup-code-every-time-you-save/ , it gives you guide how to set up in eclipse. woohh sweet again!



Spring devtools maven
dependency on automatic restarting the application

https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html


copy and paste in pom.xml




Thursday, February 8, 2018

Friday, September 15, 2017

GVIM color it

I really like VIM even I'm still not yet a master... hehe.

One way you use VIM in windows is to install GVIM and you can download it from official page.

As I don't like the default colorscheme in GVIM, I found a way to change it and they also provide a lot of color scheme to available for us.

You can download the color scheme in this site
http://vimcolors.com/

Save it in folder
C:\Program Files (x86)\Vim\vim80\colors

and finally, add in the last line in _vimrc found in C:\Program Files (x86)\Vim
eg.
colorscheme carbonized-dark


Eureka!


Tuesday, September 5, 2017

The Power of VIM


h   move one character left
j   move one row down
k   move one row up
l   move one character right
w   move to beginning of next word
b   move to previous beginning of word
e   move to end of word
W   move to beginning of next word after a whitespace
B   move to beginning of previous word before a whitespace
E   move to end of word before a whitespace


0   move to beginning of line
$   move to end of line
_   move to first non-blank character of the line
g_  move to last non-blank character of the line

gg  move to first line
G   move to last line
ngg move to n'th line of file (n is a number; 12G moves to line 12)
nG  move to n'th line of file (n is a number; 12G moves to line 12)
H move to top of screen M move to middle of screen L move to bottom of screen
zz scroll the line with the cursor to the center of the screen zt scroll the line with the cursor to the top zb scroll the line with the cursor to the bottom
Ctrl-D move half-page down Ctrl-U move half-page up Ctrl-B page up Ctrl-F page down Ctrl-O jump to last (older) cursor position Ctrl-I jump to next cursor position (after Ctrl-O) Ctrl-Y move view pane up Ctrl-E move view pane down
n next matching search pattern N previous matching search pattern
  • next whole word under cursor
  1. previous whole word under cursor
g* next matching search (not whole word) pattern under cursor
gd  go to definition/first occurrence of the word under cursor
g#  previous matching search (not whole word) pattern under cursor
%   jump to matching bracket { } [ ] ( )

fX  to next 'X' after cursor, in the same line (X is any character)
FX  to previous 'X' before cursor (f and F put the cursor on X)
tX  til next 'X' (similar to above, but cursor is before X)
TX  til previous 'X'
;   repeat above, in same direction
,   repeat above, in reverse direction



References:
http://vim.wikia.com/wiki/All_the_right_moves


It's all about VIM

Move the cursor from the two (vertical) split window in Vim.

By holding the the Ctrl, press w two times do the magic.


Ctrl-w w or type :wincmd w to move the cursor between the two windows/buffers.


Eureka!

References:
https://stackoverflow.com/questions/6071266/how-to-flip-windows-in-vim

free online comma separating tool

https://delim.co/#