summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Guschin <guschin.drew@gmail.com>2022-04-04 09:43:26 +0400
committerAndrew Guschin <guschin.drew@gmail.com>2022-04-04 09:43:26 +0400
commit2b24616570009e1f693cb2a267dc2429193140b0 (patch)
tree8f08e617285b257a8524110fdb944a1872b480a1
parent595a36327df589169e0a443676ae3d166242397a (diff)
Moved vim config to separate repo and reorganized PATH exports in .profile
-rw-r--r--.config/vim/init.vim65
-rw-r--r--.profile20
2 files changed, 17 insertions, 68 deletions
diff --git a/.config/vim/init.vim b/.config/vim/init.vim
deleted file mode 100644
index 31f5f93..0000000
--- a/.config/vim/init.vim
+++ /dev/null
@@ -1,65 +0,0 @@
-set nocompatible
-
-set rtp+=$XDG_CONFIG_HOME/vim/
-call plug#begin("$XDG_CONFIG_HOME/vim/plugins")
-Plug 'scrooloose/nerdcommenter'
-Plug 'vim-airline/vim-airline'
-Plug 'tpope/vim-commentary'
-call plug#end()
-filetype plugin indent on
-
-syntax on
-set tabstop=4
-set softtabstop=4
-set shiftwidth=4
-set expandtab
-set autochdir
-set colorcolumn=80,120
-highlight ColorColumn ctermbg=8 guibg=lightgrey
-set formatprg=par\ -w80
-set autoread
-au CursorHold,CursorHoldI * checktime
-au FocusGained,BufEnter * :checktime
-
-" Enable clipboard buffer to be used as vim buffer
-" set clipboard=unnamedplus
-set mouse=a
-
-" Settings for gvim
-set guioptions-=m "remove menu bar
-set guioptions-=T "remove toolbar
-set guioptions-=r "remove right-hand scroll bar
-set guioptions-=L "remove left-hand scroll bar
-
-" Set line numbering rules
-set relativenumber number
-au InsertEnter * set number norelativenumber
-au InsertLeave * set relativenumber
-
-let mapleader="\<Space>"
-
-" Remap splits shortcuts
-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>
-
-nmap <leader>s <ESC>:vsplit<CR>
-nmap <leader>vs <ESC>:split<CR>
-
-" NERDCommenter config
-let g:NERDSpaceDelims = 1
-let g:NERDDefaultAlign = 'left'
-let g:NERDCommentEmptyLines = 0
-let g:NERDTrimTrailingWhitespace = 1
-let g:NERDTreeChDirMode=2
-
-" NERDCommenter shortcuts
-nmap <C-k> <leader>c<space>
-vmap <C-k> <leader>c<space>
-
-" Copy to clipboard
-nmap <leader>y "+y
-vmap <leader>y "+y
-nmap <leader>d "+d
-vmap <leader>d "+d
diff --git a/.profile b/.profile
index 31c65e9..c73f55c 100644
--- a/.profile
+++ b/.profile
@@ -61,14 +61,28 @@ export GEM_SPEC_CACHE="$XDG_CACHE_HOME/gem"
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME/bundle"
export BUNDLE_USER_CACHE="$XDG_CACHE_HOME/bundle"
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME/bundle"
+if [ -d "$GEM_HOME/ruby" ]; then
+ PATH="$PATH:$(du $GEM_HOME/ruby/*/bin | cut -f2 | paste -s -d ':' -)"
+fi
+export PATH="$PATH:$GEM_HOME/bin"
# Rust
export CARGO_HOME="$XDG_DATA_HOME/cargo"
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
+export PATH="$PATH:$CARGO_HOME/bin"
# Go
export GOPATH="$XDG_DATA_HOME/go"
+export PATH="$PATH:$GOPATH/bin"
+
+# Python
+# On Linux python executables installed with pip should be in ~/.local/bin
+if [ "$(uname)" = "Darwin" ]; then
+ _pypaths="$(du $HOME/Library/Python/*/bin | cut -f2 | paste -s -d ':' -)"
+ export PATH="$PATH:$_pypaths"
+ unset _pypaths
+fi
-export PATH="$PATH:/opt/homebrew/bin"
-export PATH="$PATH:$CARGO_HOME/bin:$GOPATH/bin:$GEM_HOME/bin"
-export PATH="$PATH:$(du $GEM_HOME/ruby/*/bin | cut -f2 | paste -s -d ':' -)"
+if [ "$(uname)" = "Darwin" ]; then
+ export PATH="$PATH:/opt/homebrew/bin"
+fi