diff options
-rw-r--r-- | .emacs.d/init.el | 33 | ||||
-rw-r--r-- | .vim/init.vim | 23 | ||||
-rw-r--r-- | .vim/plugins/ime.vim | 4 | ||||
-rw-r--r-- | .vim/plugins/startify.vim | 1 | ||||
-rw-r--r-- | .vim/plugins/tex.vim | 1 |
5 files changed, 53 insertions, 9 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index b3583b0..141702e 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -4,12 +4,18 @@ '("melpa" . "https://melpa.org/packages/")) (package-initialize) +(dolist (package '(use-package)) + (unless (package-installed-p package) + (package-install package))) +(require 'use-package) + (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(package-selected-packages '(paredit auto-complete ledger-mode evil))) + '(package-selected-packages + '(evil-escape counsel evil-org paredit auto-complete ledger-mode evil))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -26,9 +32,26 @@ (package-install 'evil)) (require 'evil) (evil-mode 1) +(evil-set-leader 'normal ",") + +;; Evil escape +(unless (package-installed-p 'evil-escape) + (package-install 'evil-escape)) +(require 'evil-escape) +(evil-escape-mode) +(setq-default + evil-escape-key-sequence "jk" + evil-escape-unordered-key-sequence t) ;; Org Mode (add-hook 'org-mode-hook (lambda () (setq truncate-lines nil))) +(use-package evil-org + :ensure t + :after org + :hook (org-mode . (lambda () evil-org-mode)) + :config + (require 'evil-org-agenda) + (evil-org-agenda-set-keys)) ;; ledger-mode (unless (package-installed-p 'ledger-mode) @@ -54,3 +77,11 @@ (require 'paredit) (add-hook 'emacs-lisp-mode-hook (lambda () (paredit-mode 1))) +;; Counsel +(unless (package-installed-p 'counsel) + (package-install 'counsel)) +(ivy-mode) +(setq ivy-use-virutal-buffers t) +(setq enable-recursive-minibuffers t) +(evil-define-key 'normal 'global (kbd "<leader>ff") 'counsel-find-file) +(evil-define-key 'normal 'global (kbd "go") 'counsel-git-grep) diff --git a/.vim/init.vim b/.vim/init.vim index bd00085..93bebcc 100644 --- a/.vim/init.vim +++ b/.vim/init.vim @@ -13,7 +13,7 @@ filetype indent on set modeline set textwidth=72 set formatoptions+=mB -set formatoptions-=t +set formatoptions-=tc set secure set hidden @@ -29,8 +29,19 @@ endif if has("gui_running") if has("gui_macvim") set guifont=Monaco:h15 - set noimdisable set transparency=10 + set noimdisable + + noremap <D-1> :tabn 1<CR> + noremap <D-2> :tabn 2<CR> + noremap <D-3> :tabn 3<CR> + noremap <D-4> :tabn 4<CR> + noremap <D-5> :tabn 5<CR> + noremap <D-6> :tabn 6<CR> + noremap <D-7> :tabn 7<CR> + noremap <D-8> :tabn 8<CR> + noremap <D-9> :tabn 9<CR> + noremap <D-0> :tablat<CR> endif endif @@ -83,8 +94,12 @@ set tags=./.tags;,.tags " mapping let mapleader=',' " change the key <leader> -nnoremap <leader>n :bn<CR> -nnoremap <leader>p :bp<CR> +inoremap jk <Esc> +nnoremap [w <c-w>h <CR> +nnoremap [ww <c-w>k <CR> +nnoremap ]w :wincmd l <CR> +nnoremap ]ww :wincmd j <CR> +nnoremap <leader>cd :cd %:p:h<CR> :pwd<CR> source ~/.dotfiles/.vim/plugins/init.vim diff --git a/.vim/plugins/ime.vim b/.vim/plugins/ime.vim deleted file mode 100644 index de7dcf2..0000000 --- a/.vim/plugins/ime.vim +++ /dev/null @@ -1,4 +0,0 @@ -Plug 'pi314/ime.vim' -Plug 'pi314/ime-phonetic.vim' - -let g:ime_plugins = ['pinyin'] diff --git a/.vim/plugins/startify.vim b/.vim/plugins/startify.vim new file mode 100644 index 0000000..a4f7c1d --- /dev/null +++ b/.vim/plugins/startify.vim @@ -0,0 +1 @@ +Plug 'mhinz/vim-startify' diff --git a/.vim/plugins/tex.vim b/.vim/plugins/tex.vim new file mode 100644 index 0000000..b74256a --- /dev/null +++ b/.vim/plugins/tex.vim @@ -0,0 +1 @@ +Plug 'lervag/vimtex' |