2022-08-12
goland-vim

記錄一下在 goland 使用 vim plugin 的資料,plugin IdeaVim

Reference

Read More

2022-08-12
IDE-goland-key-repeat

最近開始嘗試寫 GoLand,寫的過程中,發現沒有一個好用的 IDE,在寫 go code 上,滿不方便的
尤其是,目前對於要如何找 API document 是有個滿大的困擾的

所以囉,就安裝了 JetBrains 的 GoLand 來試用。
因為,我習慣了用 vim 來編輯,就也是希望能在 GoLand 中,可以用 vim 的 keybinding

安裝好 plugin 後,就發現無法一直按著 h j k l 來移動
這對於一個 vim 的使用者來說,很不方便,就找找看變更的方式囉

修改的流程

  • 找到對應要修改的 identifier
    • $ cat /Applications/GoLand.app/Contents/Info.plist | grep -A 5 -B 5 -i BundleIdentifier
  • 修改設定
    • defaults write com.jetbrains.goland ApplePressAndHoldEnabled -bool false
  • 重啟 GoLand

Reference

Read More

2022-04-08
vim-code-navigate

Read More

2021-09-23
Vimium

在重新玩 vim 的過程中,有找到一個 for chrome 的 extension
試了之後,還滿好玩的,加以記錄之

目前常用到的 cmd 是?

  • d/u:下一頁,上一頁
  • x:關閉 tab
  • gt/gT:切換到下一個 tab, 上一個 tab

Reference

Read More

2021-09-23
vim-theme

最近有花了一些時間看一下 vim
就剛好有看到一個滿有趣的 theme - Dracula theme,這在 dark mode 的 theme 聽說還滿有名的

同場加映

在試用 dracula theme 時,有看到幾篇還滿不錯的文章,就加以記錄囉

Reference

Read More

2021-09-07
vim-tip-2021-09-06

一直以來都喜歡,也習慣用 vim。想說,多多用些大家常用的 package 來幫助日常的 coding
也試著將 coding 的部分,多以不離開 vim 就可以做到的方式,來多多練習

nerdtree 一直都是滿多人推薦在 vim 中使用的,有安裝但是沒有特別使用,這次想說多來用用看

  • 目前常用的 command
    • Ctrl-N:開啟 & 關閉 nerdtree
    • Ctrl-W L, Ctrl-L:切換到 右邊的視窗
    • Ctrl-W HCtrl-H:切換到 左邊的視窗

Reference

  • nerdtree - A tree explorer plugin for vim.

教學

Read More

2021-09-07
vim-tip-2021-09-07

列一下,今天學到的 vim 技巧
如何在 NERDTree 中,新增一個檔案

  • 在想要新增的目錄中,按下 m 開啟 NERDTree Filesystem Menu
  • 接著按下 a,新增一個 child node

reference

Read More

2020-11-24
powerline_use

目前是用 powerline 來當作 vim status bar 的顯示,記錄一下用 powerline 遇到的情形

遇到的 issue

Reference

  • powerline/powerline - Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.
Read More

2020-09-23
vim-plugin-used

列一下,我有用到的 vim plugin,還有常用到的 設定 or keymap (key binding)

plugin (package) 管理工具

跟 auto-complete 相關

跟 folder 結構有關

之前用 vim 時,會不喜歡多一個 window 顯示 folder,隨著對 window 的熟悉,有開一個 folder 的側邊也滿好的

  • preservim/nerdtree - A tree explorer plugin for vim
  • 設定 ctrl-n 為 toogle nerdtree 的出現
  • 在 nerdtree 中,按下 t 時,會將檔案開在新的 tab

file search tool

  • ctrlpvim/ctrlp.vim * 滿強大的 file search 工具
    • 可以用 :CtrlP 或是 或是 <c-p> 呼叫 CtrlP fuzzy find 的功能
    • 在 CtrlP 的模式下
      • Press <c-f> and <c-b> to cycle between modes.
      • Press <c-d> to switch to filename only search instead of full path.
      • Press <c-r> to switch to regexp mode.
      • Use <c-j>, <c-k> or the arrow keys to navigate the result list.

comment

vim tab movement

1
2
3
" easier moving between tabs
map <Leader>n <esc>:tabprevious<CR>
map <Leader>m <esc>:tabnext<CR>

vim window movement

1
2
3
4
5
"""""" windows split shortcut
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>

Reference

Read More

2020-09-17
my-vim-new-setup

藉由這次重新設定 & 安裝 vim,同時整理一下目前使用 vim 的方式

安裝 vim

現在的 vim 想使用的進階功能,會用到 vim + python 的功能,所以需要重新安裝 vim。
目前用 brew install vim 滿方便,又快速的,就是要記得將執行 brew update,取得最近的 vim 設定

1
2
3
4
5
6
$ brew update
$ brew install vim
$ vim --version | grep -i python3
+comments +libcall -python +visual
+conceal +linebreak +python3 +visualextra
## 要確認 python3 有 enable 起來

如果看到 python3 沒有 enable 的話,記得確認一下 vim 是那一版

1
2
3
$ which vim
/usr/local/bin/vim
# 在 /user/local 下的,才是用 brew 安裝的

theme

有安裝好用的 package

Reference

Reference vimrc

Read More