/java-kotlin-gf

Improve go to file (gf) experience on java/kotlin project

Primary LanguageLuaApache License 2.0Apache-2.0

java-kotlin-gf

Improve go to file (gf) experience on java/kotlin project

Installation

Using vim-plug

Plug 'chau-bao-long/java-kotlin-gf'

Quick Start

nmap gf :GoToFile<cr>
nmap gT :GoToFile tabedit<cr>

Run GradleSyncSource command first, and gf or gT to see the magic

Commands

To go to the file in current buffer, new tab, vertical or horizontal split

GoToFile ['e'|'tabnew'|'sp'|'vs'] 

To extract source from gradle, which access by gf

GradleSyncSource

Configuration

  • Add more src path and test path to allow gf to detect file
let g:srcPath = [
      \ "/app/src/main/kotlin/",
      \ "/app/src/test/kotlin/",
      \ "/src/main/kotlin/",
      \ "/src/test/kotlin/",
      \ ]
  • Change where to keep extracted source lib
let g:libPath = "~/.gradle/src"