[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
vim
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 34
Thread images: 2
Haven't seen a vim thread for a while so n/vim thread
>>
how do I make emacs use tabs for indentation?
>>
Share vimrc

" ### vim-plug ###
call plug#begin()
Plug 'tomasr/molokai'
Plug 'scrooloose/nerdtree'
Plug 'bling/vim-airline'
Plug 'cohama/lexima.vim'
Plug 'tpope/vim-fugitive'
Plug 'kien/ctrlp.vim'
Plug 'tpope/vim-surround'
Plug 'airblade/vim-gitgutter'
Plug 'scrooloose/syntastic'
Plug 'scrooloose/nerdcommenter'
Plug 'marijnh/tern_for_vim'
Plug 'Valloric/YouCompleteMe'
Plug 'pangloss/vim-javascript'
Plug 'easymotion/vim-easymotion'
Plug 'tpope/vim-repeat'
Plug 'fatih/vim-go'
Plug 'othree/html5.vim'
Plug 'elzr/vim-json'
Plug 'nono/jquery.vim'
Plug 'moll/vim-node'
Plug 'LaTeX-Box-Team/LaTeX-Box'
call plug#end()

" ### Vim Settings ###
filetype plugin indent on
syntax on

set undofile
set undodir=~/.config/nvim/undo
set noswapfile
set wildmode=longest,list,full
set wildmenu
set ignorecase
set smartcase
set gdefault
set showmatch
set backspace=indent,eol,start
set shortmess+=I
set number
set hlsearch
set incsearch
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smarttab
set expandtab
set ai
set laststatus=2

" ### Plugin Settings ###
colorscheme molokai

let g:ycm_global_ycm_extra_conf = "~/.ycm_extra_conf.py"
let g:ycm_confirm_extra_conf = 0

let g:rehash256 = 1

let g:nerdtree_open_on_console_startup=0

let delimitMate_autoclose = 1

let g:indent_guides_enable_on_vim_startup = 1
let g:indent_guides_guide_size = 1
let g:indent_guides_start_level = 2

let g:syntastic_cpp_cpplint_exec='/usr/bin/cpplint'
let g:syntastic_cpp_check_header = 1
let g:syntastic_cpp_compiler = 'clang++'
let g:syntastic_cpp_compiler_options = '-std=c++14'
let g:syntastic_cpp_checkers = ['cpplint']

let g:airline_theme="jellybeans"
let g:airline_left_alt_sep = ' | '
let g:airline_left_sep = ''
let g:airline_right_alt_sep = ' | '
let g:airline_right_sep = ''
>>
>>51231031
C-x C-c vim<CR>:set noet
>>
File: GG white phosphorous.png (170 KB, 320x319) Image search: [Google]
GG white phosphorous.png
170 KB, 320x319
>>51231064
>>
>>51229061
Does anybody use vim for java development? How feasible is it to use it just for the text editings?
>>
>>51231224
I try to use vim for as much development as possible. However I can't even fathom writing Java in vim. It's just too IDE centric.

I presonally use IntelliJ IDEA and Android Studio with the Vim plugin
>>
>>51231224
when i had to use java for my programming classes, vim worked well.

usually, i have a tmux session with a vsplit. on the top, i write my code in vim, and on the bottom, i have a shell where i run my shitty java 101 programs.

the following shell alias has helped a lot, because i can then just run `j XY<tab><enter>':

j () { 
cls="${1%.*}";
javac "$cls.java" && java "$cls"
}
>>
>>51231053
Hi, vim-plug guy, I'm new to plugins having used vim in vanilla for a while now, how do you find vim-plug compared to Vundle or Pathogen?

I installed YCM with vim-plug and it works, but it was laggy as fuck, so I tried neovim and I couldn't configure it at all because it doesn't recognize my .nvimrc, any ideas why? The file is in the home folder, and I also tried moving it to the .nvim folder

Here's my slightly barebones and simple .vimrc anyway

"secure encryption
set cryptmethod=blowfish2

"not compat with vi
set nocompatible

"line numbering

set number

"highlighting

syntax enable

set encoding=utf-8

set showcmd

filetype plugin indent on

" search options
set hlsearch
set incsearch
set ignorecase
set smartcase

" Allows you to have multiple buffers open
set hidden

" Make backspace behave like other editors
" set backspace=indent,eol,start

" Automatically indent on new lines
set autoindent

" Copy the indentation of the previous line if auto indent doesn't know what to do
set copyindent

" Highlight matching braces/tags
set showmatch

" More undos
set undolevels=2000

" Vim can set the title of the terminal window
set title

" Use a visual indicator instead of a beep
set visualbell

" Tell vim that your terminal supports 256 colors
set t_Co=256

" Toggle paste mode with F2
set pastetoggle=&lt;F2&gt;

" Use ; instead of : to enter commands, saves a lot of keystrokes in the long run
nnoremap ; :

colorscheme koehler

"vim-plug

call plug#begin('~/.vim/plugged')

" Make sure you use single quotes
Plug 'Valloric/YouCompleteMe', { 'do': './install.py' }

call plug#end()
>>
>>51231783
I don't usually care much about plugin managers, but I read somewhere about vim-plug and decided to try it out. It's lean, not verbose at all and installs things concurrently so that's nice.

I used YCM for a medium sized C++ project recently and it worked just fine. Go also works fine.

As for neovim (which I also use), it recently switched to using the XDG directory

https://neovim.io/doc/user/nvim_from_vim.html

Move ~/.nvim/ to ~/.config/nvim/ and ~/.nvimrc to ~/.config/nvim/init.vim

Took me a day to figure it out too...
>>
>>51231956
Thanks, as usual, the 'google search documentation' seems to be out of date, and that's the first place I try. Works fine now, thanks again.
>>
>>51231956
Btw did you get neovim to work with YCM and other plugins, or is it a case of some working and others not working?
>>
>>51232124
Yes. Everything I use is working together nicely.

Remember to run ./install.py from the YCM directory (I compile with --clang-completer --gocode-completer) after installing the plugin. It won't work oterwise
>>
What is the best non-vim vi replacement?
>>
>>51231224
Syntastic + javacomplete gives a nice IDE-like experience. Syntastic will tell you about syntax errors, unknown symbols, etc on each save and javacomplete lets you use omni-complete (c-x c-o) on class members and imports and such.

Syntastic was easy to set up but javacomplete was a bit of a faff. I couldn't get vim to compile the Reflection.java file by itself so I had to compile it and put everything into the plugin folder.
>>
>>51232168
I actually installed YCM using the internal vim command while having the YCM bit in my vimrc (think it was something like :PlugInstall YouCompleteMe) and it didn't seem to like that in neovim but maybe I did it wrong.

>>51232178
neovim, duh
>>
Best vim color scheme?
>>
Nvi master race.

Vim and Neovim are bloated shitware with a horrible scripting language.
>>
>>51232208
koehler

>>51232264
the what now? seriously, what's the point of another fork...
neovim has the right idea
>>
>>51232208
I use PaperColor. It's the only color scheme I found that works on a white background.
>>
>>51232205
There's a bunch of things that could have gone wrong. Check what :ycmDiags says.
Maybe the script is executing using python3 instead of python2? Try manually going to the plugged/youCompleteMe directory and executing python2 ./install

Also check if you have python2 in NeoVim. It's usually not there by default. You can install it using pip or depending on the distro you are suing it might be in some repo.
https://github.com/neovim/python-client
>>
>>51232405
Nvi is not just a fork. It's based on the original ex/vi, therefore it is more pure than your Ugandan donateware that dumped a bunch of shit onto vi to make it more Emacs-like.
>>
>not using ex
What's your excuse?
>>
>>51232485
It's based on a vi clone called elvis tbqh

I don't think it even has unicode support tbvqh
>>
>>51232449
Error detected while processing /home/faget/.config/nvim/init.vim:
line 61:
E117: Unknown function: plug#begin
line 64:
E492: Not an editor command: Plug 'Valloric/YouCompleteMe', { 'do': './install.py' }
line 66:
E117: Unknown function: plug#end
Press ENTER or type command to continue



That happens when I load neovim (with the vim-plug section for YCM).

I'm trying to do a fresh separate install of YCM for neovim seeing as it has it's own directories for stuff. The ycmDiags command isn't available to me because it's not even installed in neovim yet.

I installed python2 for neovim using the command on that github, it still won't work.

Also I definitely have python 2 installed, that's what I used for vanilla vim.
>>
"brew install neovim/neovim/neovim"


lol why the fuck do i gotta type that
>>
>>51232606
Vim isn't parsing vim-plug, so it isn't installing YCM.

Check if you have a single file called plug.vim in ~/.config/nvim/autoload/
>>
>>51232680
Sorry I'm retarded, I copied over vim-plug now and it works (obviously).

Couple of things I noticed, it still lags a tiny bit which I did not expect on this i5 2.4ghz + Nvidia 2xx series + 8gb ram.

Also, it's picked up the vim copy of YCM because when I tried to install it again within vim, it just said 'YouCompleteMe: Already installed'
>>
>>51232405
How to make the scheme persistent? Add a "color koehler" line to /etc/vim/vimrc ?


>hurr durr you thought you are done after just one captcha? NOOOOOOO solve moar designated shite street name sign captchas hurr
>>
>>51232915
see my vimrc dude, or do ctrl f for colorscheme

color koehler would probably work though i'm not 100% sure, vim does have cool macro sensing or whatever it's called

>>51231783
>>
>>51232895
Glad to hear it's working

YCM is a very big plugin. Some slow down is to be expected unfortunately. Try to tinker with the settings and reading the very extensive documentation. You might improve something.
>>
>>51232502
I use sam
>>
>>51233167
I am even more confused now, I installed YCM from within neovim and it's installed it back to the old vim directory location (I guess because it picks up the location from the nvimrc but why does it put it there). Meh, it works.
>>
what's the best way of compiling latex? i'm new to latex and i'm already using vim for simple text.
Thread replies: 34
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.