vim 에디터 꾸미기

BackEnd_Ash.log·2020년 2월 20일
0

파이썬

목록 보기
9/34

에디터를 꾸며 보도록 하자
아마도 경로는 다를것같다.
그러니 파일을 찾을려고 하면 될것같다.

.vimrc 이라는 파일을 들어가서 고치면 된다.

https://medium.com/sunhyoups-story/vim-%EC%97%90%EB%94%94%ED%84%B0-%EC%9D%B4%EC%81%98%EA%B2%8C-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0-5b6b8d546017
PluginInstall 를 사용할려면 vundle 를 우선적으로 설치해야한다

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

여기 블로그를 참고해서 하면 되는데 ,

보기 귀찮다 ?? 하는사람은

set nocompatible              " be iMproved, required
filetype off                  " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin),
"Plugin 'file:///home/jjeaby/Dev/tools/vim-plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}
" All of your Plugins must be added before the following line
Plugin 'tpope/vim-surround'
Plugin 'uarun/vim-protobuf'
Plugin 'taq/vim-git-branch-info'
Plugin 'bling/vim-airline'
Plugin 'tomtom/tlib_vim'
Plugin 'majutsushi/tagbar'
Plugin 'gre/play2vim.git'
Plugin 'othree/html5.vim'
Plugin 'rodjek/vim-puppet'
Plugin 'scrooloose/nerdcommenter'
Plugin 'vim-scripts/L9'
Plugin 'wikitopian/hardmode'
Plugin 'vim-scripts/Align'
Plugin 'rking/ag.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'luochen1990/rainbow'
Plugin 'jtai/vim-womprat'
Plugin 'chrisbra/vim-diff-enhanced'
Plugin 'derekwyatt/vim-sbt'
Plugin 'elzr/vim-json'
Plugin 'noahfrederick/vim-hemisu'
Plugin 'mkitt/tabline.vim'
"Plugin 'Shougo/neocomplcache.vim'
Plugin 'kennethzfeng/vim-raml'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'grassdog/tagman.vim'
" Colorscheme plugins
Plugin 'endel/vim-github-colorscheme'
Plugin 'flazz/vim-colorschemes'
Plugin 'vim-scripts/ScrollColors'
Plugin 'nanotech/jellybeans.vim'
Plugin 'junegunn/seoul256.vim'
Plugin 'reedes/vim-colors-pencil'
Plugin 'zenorocha/dracula-theme', {'rtp': 'vim/'}
Plugin 'mtglsk/mushroom'
Plugin 'ayu-theme/ayu-vim'
Plugin 'morhetz/gruvbox'
" python
Plugin 'hdima/python-syntax'
Plugin 'tmhedberg/SimpylFold'
Plugin 'vim-scripts/indentpython.vim'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'vim-syntastic/syntastic'
Plugin 'Raimondi/delimitMate'
" Modify * to also work with visual selections
Plugin 'nelstrom/vim-visual-star-search'
" Automatically clear search highlights after you move your cursor.
Plugin 'haya14busa/is.vim'
" Handle multi-file find and replace.
Plugin 'mhinz/vim-grepper'
Plugin 'lygaret/autohighlight.vim'
Plugin 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plugin 'junegunn/fzf.vim'
Plugin 'junegunn/vim-easy-align'
" Start interactive EasyAlign in visual mode (e.g. vipga)
xmap ga <Plug>(EasyAlign)
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)
call vundle#end()            " required
"filetype plugin indent on    " required
""""""""""""""""""""""""""""""""""
" VIM General settings
""""""""""""""""""""""""""""""""""
" On even hour, use dark colortheme
" On odd hour, use light colortheme
set t_Co=256          " enables 256 colors
set termguicolors     " enable true colors support
syntax enable
set encoding=utf-8
"let ayucolor="light"  " for light version of theme
"let ayucolor="mirage" " for mirage version of theme
"let ayucolor="dark"   " for dark version of theme
"colorscheme ayu
set background=dark
"let g:seoul256_background = 233
"colo seoul256
let g:solarized_termcolors=256
colo gruvbox
" vim reads the file when it changes
" check one time after 4s of inactivity in normal mode
set autoread
au CursorHold * checktim
set noundofile
set mouse=a
set switchbuf=useopen " reveal already opened files from the
                      " quickfix window instead of opening new
                      " buffers
set history=1000      " remember more commands and search history
set undolevels=1000   " use many muchos levels of undo
set hidden            " hide buffers instead of closing them this
                      " means that the current buffer can be put
                      " to background without being written; and
                      " that marks and undo history are preserved
set nobackup          " do not keep backup files, it's 70's style cluttering
set noswapfile        " do not write annoying intermediate swap files,
set showcmd           " show the command being typed
set ruler             " Always show current positions along the bottom
set nostartofline     " leave my cursor where it was
set colorcolumn=120   " highlight maximum line length
set cursorline        " highlight current line
set number
set relativenumber
set numberwidth=5     " We are good up to 99999 lines
set backspace=2       " make backspace work like most other apps
let g:jsx_ext_required    = 0 "If you would like JSX in .js files
let delimitMate_expand_cr = 1
" cursor_highlight
:highlight CursorAutoHighlight guibg=red
" Vim file tree setting
" d creates a new directory
" % creates and opens a new file
" D deletes a directory or file
" R renames a file
" o opens the file in a horizontal split
" v opens the file in a vertical split
let g:netrw_liststyle=3
let g:netrw_winsize = 1
" delimitMate
let delimitMate_expand_cr=1
" pep8 ignore
let g:autopep8_ignore="E501,W293"
" Neocompletecache setting
"let g:neocomplcache_enable_at_startup = 1
""""""""""""""""""""""""""""""""""
" Hide tool bar for macvim
""""""""""""""""""""""""""""""""""
if has("gui_running")
    set guioptions=egmrt
endif
""""""""""""""""""""""""""""""""""
" Switch on filetype detection and loads
" indent file (indent.vim) for specific file types
""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""
"set font
""""""""""""""""""""""""""""""""""
set gfn=D2Coding:h15
""""""""""""""""""""""""""""""""""
" set nu " Number lines
""""""""""""""""""""""""""""""""""
set hls " highlight search
set lbr " linebreak
""""""""""""""""""""""""""""""""""
" Use 2 space instead of tab during format
""""""""""""""""""""""""""""""""""
"set tabstop=2     " determines how many space tap should be counted for when tab is read
"set shiftwidth=2
"set softtabstop=2 " determines how many space tap should be countered for when tab key is hit
"set expandtab
"set autoindent    " Copy indent from the row above
"set smartindent
"set cindent
""""""""""""""""""""""""""""""""""""""""""""
""""""""""""For python""""""""""""""""""""""
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
set softtabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab
""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""
" For Python
au BufNewFile,BufRead *.py
    \ set tabstop=4 |
    \ set softtabstop=4 |
    \ set shiftwidth=4 |
    \ set expandtab |
    "\ set autoindent |
    \ set fileformat=unix
let python_highlight_all = 1
" Indent guide plugin setting (https://github.com/nathanaelkane/vim-indent-guides)
let g:indent_guides_auto_colors = 0
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd  guibg=red   ctermbg=3
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=4
" For XML
au BufNewFile,BufRead *.xml
    \ set tabstop=4 |
    \ set softtabstop=4 |
    \ set shiftwidth=4 |
    \ set expandtab |
    \ set autoindent |
    \ set fileformat=unix
""""""""""""""""""""""""""""""""""
" NERD Tree
""""""""""""""""""""""""""""""""""
map <F3> :NERDTreeToggle<CR>
" Show hidden files, too
let NERDTreeShowFiles=1
let NERDTreeShowHidden=1
" Highlight the selected entry in the tree
let NERDTreeHighlightCursorline=1
""""""""""""""""""""""""""""""""""
" GIT set-ups
""""""""""""""""""""""""""""""""""
set laststatus=2                          " Enables the status line at the bottom of Vim
set statusline=%{GitBranchInfoString()}\ \ \ \ \ %f
let g:git_branch_status_head_current=1    " Display only the current branch
""""""""""""""""""""""""""""""""""
" CTags
""""""""""""""""""""""""""""""""""
set tags=./tags;/
""""""""""""""""""""""""""""""""""
" Search Highlights
""""""""""""""""""""""""""""""""""
set hlsearch            " turn off highlight searches, but:
                        " Turn hlsearch off/on with CTRL-N
:map <silent> <C-N> :se invhlsearch<CR>
""""""""""""""""""""""""""""""""""
" Key Maps
""""""""""""""""""""""""""""""""""
set pastetoggle=<F1>                          " retain original indents when pating
map <F2> :TagbarToggle<CR>                    " Tagbar Toggle
""""""""""""""""""""""""""""""""""
" Rainbow Parentheses
""""""""""""""""""""""""""""""""""
let g:rainbow_active = 1
let g:rainbow_conf   = {
\   'ctermfgs': ['darkblue', 'darkgreen', 'darkcyan', 'darkmagenta']
\}
"""""""""""""""""""""""""""""""""""""""""
" copy to OS clipboard
"""""""""""""""""""""""""""""""""""""""""
" Set clipboard t0 unnamedplus only if it's not Mac OS X
set clipboard=unnamed
if has("unix")
  let s:uname = system("uname")
  if s:uname == "Linux\n"
    set clipboard=unnamedplus
  endif
else
    set clipboard=unnamed
endif
vnoremap <C-c> "*y
vnoremap <C-p> "*p
vmap ,c "+y
vmap ,p "*p
set wildignore+=*/tmp/*,*/target/*,*.so,*.swp,*.zip,*.tag
""""""""""""""""""""""""""""""""""
" Neocomplcache
""""""""""""""""""""""""""""""""""
"let g:neocomplcache_enable_at_startup = 1
""""""""""""""""""""""""""""""""""
" vim-airline
""""""""""""""""""""""""""""""""""
let g:airline_theme = 'gruvbox'
function! AccentDemo()
  let keys = ['J','A','K','D','U']
  for k in keys
    call airline#parts#define_text(k, k)
  endfor
  call airline#parts#define_accent('J', 'red')
  call airline#parts#define_accent('A', 'purple')
  call airline#parts#define_accent('K', 'blue')
  call airline#parts#define_accent('D', 'yellow')
  call airline#parts#define_accent('U', 'orange')
  let g:airline_section_a = airline#section#create(keys)
endfunction
autocmd VimEnter * call AccentDemo()
let g:airline#extensions#branch#enabled = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '>>>'
let g:airline#extensions#default#layout = [
\ [ 'a', 'b'],
\ [ 'c']
\ ]
""""""""""""""""""""""""""""""""""
" Disable arrow keys
""""""""""""""""""""""""""""""""""
" noremap <Up> <NOP>
" noremap <Down> <NOP>
" noremap <Left> <NOP>
" noremap <Right> <NOP>
""""""""""""""""""""""""""""""""""
" Folding Option
""""""""""""""""""""""""""""""""""
set foldmethod=indent
set foldlevel=99
" Enable folding with the spacebar
nnoremap <space> za
" SimpleyFold plugin for python fold. Display docstirng when folded
let g:SimpylFold_docstring_preview = 1
set clipboard=unnamed           "yank, paste to system clipboard

" 구문 강조 사용
if has("syntax")
 syntax on
endif


위를 복사해서 붙여넣기 하면된다 .

https://kite.com/

위의 내용을 들어가서 설치하게 되면 ,
만약에 models 를 입력하고 나오는 메소드들이 출력 된다 .

vim 자동완성 기능

https://falsy.me/iterm2-vim-zsh%EC%9D%98-syntax-highlight%EB%A5%BC-%EB%B9%84%EB%A1%AF%ED%95%9C-%ED%94%8C%EB%9F%AC%EA%B7%B8%EC%9D%B8-%EB%B0%8F-%ED%85%8C%EB%A7%88-%EC%84%A4%EC%A0%95%ED%95%98%EA%B8%B0-for-mac-os/

auto highlight

https://github.com/lygaret/autohighlight.vim

괄호 자동완성

Plugin 'Raimondi/delimitMate'

" delimitMate
let delimitMate_expand_cr=1

PluginInstall 이 안될경우

https://nolboo.kim/blog/2016/09/20/vim-plugin-manager-vundle/

내가 vundle 를 설치했는지 봐야한다.

만약 conda:zsh not found 에러

__conda_setup="$('/Users/dujak/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/dujak/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/dujak/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/dujak/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<
PATH="/home/jakdu/miniconda3/bin:$PATH"
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH="/Users/ash/.oh-my-zsh"

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
if [ -f ~/.bash_profile ]; then
  . ~/.bash_profile
fi
ZSH_THEME="powerlevel10k/powerlevel10k"
POWERLEVEL9K_MODE="nerdfont-complete"

# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled  # disable automatic updates
# zstyle ':omz:update' mode auto      # update automatically without asking
# zstyle ':omz:update' mode reminder  # just remind me to update when it's time

# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13

# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
  git
  zsh-autosuggestions
)

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
export PATH=/opt/homebrew/bin:$PATH
source ~/powerlevel10k/powerlevel10k.zsh-theme

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/ash/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/ash/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/ash//miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/ash/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<
PATH="home/ash/miniconda3/bin:$PATH"
export PATH="$PATH:$HOME/Developments/flutter/bin"
profile
꾸준함이란 ... ?

0개의 댓글