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

/fvt/ - Friendly Vim Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 62
Thread images: 7

File: 1472730547411.webm (787KB, 1366x768px) Image search: [Google]
1472730547411.webm
787KB, 1366x768px
Previously >>58703527
>About Vim
Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as "vi" with most UNIX systems and with Apple OS X.

>Why Vim
Vim is rock stable and is continuously being developed to become even better. Among its features are:
#persistent, multi-level undo tree
#extensive plugin system
#support for hundreds of programming #languages and file formats
#powerful search and replace
#integrates with many tools.

>I want to use Vim but I don't know the keybindings/Nano is easier
#Learning them is easy and you only actually need a select few: navigation, search, b, i, w, :line, v and a few more
#Install Vim and get started with the built in vim tutor: vimtutor - very easy 7 lessons, takes you 30 minutes and you are there.

>I want to use mouse and click
While you can certainly do them in Vim, you will become too lazy to take your hand off the keyboard once you get comfortable with Vim.

>Vim is just a text editor
True, but you can scale Vim to be the IDE you want it to be: C/C++, Java, C#, Python, Haskell, Javascript - anything you like.


Neovim users and potential new users are also welcome.
>>
anyone working on any neat plugins? I'm working on one that lists your program variables and function heads in a side pane
>>
>>58740210
Make sure to write it in native vim-script
>>
File: workflow.webm (317KB, 1366x768px) Image search: [Google]
workflow.webm
317KB, 1366x768px
>>
>>58740254
>falling for the go meme
>>
>>
>>58740177
I'm running ubuntu. How do I get my vim to look and act like that?
>>
>>58740309
Do you know what your favourite plugin manager is?

It's mostly NerdTree, youcompleteme, tagbar and vim-airline. Installing them with pathogen is fairly easy.

>How to install pathogen (Plugin manager)
https://gist.github.com/romainl/9970697

>Plugins
http://vimawesome.com/
>>
>>58740309
>>58719945
>>
who /emacs/ here?
>>
>>58740332
Actually it uses mucomplete and tiny-line (you gotthe others right though)

mucomplete is basically as good as YCM, but doesn't need to be compiled, and tiny-line is basically a smaller air-line.
>>
Turns out the 220 character limit has never been fixed and sgr mouse doesn't do shit. The only solution is to use nvim (which isn't correctly compatible with many plugins for now). What a fucking meme. If only emacs wasn't significantly worse in every respect I'd switch to it in a heartbeat.
>>
Emacs with non-joke keybinds W H E N?
Emacs with non-garbage interactions (lack of lopen, copen, "popup" windows (see: popwin, which is a dysfunctional hack) thrashing your window setup and destructively replacing your windows) W
H
E
N
?
Tired of this vim crap.
>>
>>58740177
>>58740280
>>58740254
I remember when vim was just a text editor
>>
Anyone that uses nerdtree when netrw already exists should kill themselves
>>
>>58742417
so... never?
>>
File: Screenshot_20170201_022531.png (71KB, 792x420px) Image search: [Google]
Screenshot_20170201_022531.png
71KB, 792x420px
How do I make airline not look like shit in 2017? Do I still need to patch my fonts or what the fuck?
>>
>>58742736
yes
>vim
lmao
>>
>>58742736
airline themes
>>
>>58743267
It's buggy unless you patch your fonts.
>>
Why hasn't someone made emacs, without the pretense to be a text editor? In other words, a kind of platform-agnostic DE-in-a-box. Major modes are basically programs anyway, that they open a DE-provided text editing form to perform their operation (e.g. org-mode would open the refile in such a form) is just a coincidence. It can be viewed as an approach similar to KDE embedding kate to let you rename files in dolphin.
It would be significantly more powerful than emacs, and wouldn't have to deal with the garbage and pitfalls that come with being an actual DE and dealing with mainstream programs and their lack of standard-compliance. It would also be an opportunity to fix the crippling flaws that emacs has kept during all these years.
>>
>>58743602
I'm not an emacs fag. However I intend to fork neovim (and some plutins) into a gtk IDE
>>
>>58743841
I'm puking already. Kill yourself inbred.
>>
Are there any *nix text editors that use Windows standard key combinations (e.g. ^C, ^V, Ctrl-arrow key)? It would be nice to have tabbed viewing too with ^W to close ^Tab to change and the other common ones.
>>
>>58743954
Yes, it's called suicide.
>>
Complete noob here, do I need anything besides "syntax on" to enable syntax highlighting for python?
>>
>>58744097
No you shouldnt. Theres packaged highlighting for some languages like python. Make sure your files, in general, are using standard extensions. I.e., .py for python
>>
>>58743942
When I finish be sure to stream your suicide over jewtube. I will jerk off to it
>>
>>58744022
well that's an option, but I'd like to write programs in *this* place of existence, and not in my own blood
>>
Back to the comfy
>>
>>58743954
Oh darling, you need to learn about GNU Readline https://en.wikipedia.org/wiki/GNU_Readline
>>
Basic vimrc I got from youtube. You stop won't be needing many plugins if you like this.

" COSMETIC CHANGES:

" colorscheme
colorscheme rdark-terminal
" toolbar
set ruler

" BASIC SETUP:
" enter the new millenium
set nocompatible
" enable syntax
syntax enable
" enable plugins
filetype plugin on

" FINDING FILES:
" Search down into subfolders
" Provides tab-completion for all file-related tasks
set path+=**
" Display all matching files when we tab complete
set wildmenu

" NOW WE CAN:
" - Hit tab to :find by partial match
" - use * to make it fuzzy
" THINGS TO CONSIDER:
" - :b lets you autocomplete any buffer

" TAG JUMPING:
" Create the 'tags' file (may need to install ctags first)
command! MakeTags !ctags -R .

" NOW WE CAN:
" - Use ^] to jump to tag under cursor
" - Use g^] for ambiguous tags
" - Use ^t to jump back up the tag stack
" THINGS TO CONSIDER:
" - This doesn't help if you want a visual list of tags

" AUTOCOMPLETE:
" The good stuff is documented in |ins-completion|

" HIGHLIGHTS:
" - ^x^n for JUST this file
" - ^x^f for filenames (woks with our path trick!)
" - ^x^] for tags only
" - ^n for anything specified by the 'complete' option
" NOW WE CAN:
" - Use ^n and ^p to go back and forth in the suggestion list

" FILE BROWSING:
" Tweaks for browsing
let g:netrw_banner=0 " disable annoying banner
let g:netrw_browse_split=4 " open in prior window
let g:netrw_altv=1 " open splits to the right
let g:netrw_liststyle=3 " tree view
let g:netrw_list_hide=netrw_gitignore#Hide()
let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+'

" NOW WE CAN:
" - :edit a folder to open a file browser
" - <CR>/c/t to open in an h-split/v-split/tab
" - check |netrw-browse-maps| for more mappings

" SNIPPETS:
" Read an HTML template and move cursor to title
nnoremap ,html :-1read $HOME/.vim/snippets/skeleton.html<CR>3jwf>a

" NOW WE CAN:
" - ,html for HTML snippet
" - can be used to create more snippets
>>
In a previous thread someone was asking for a way to search and replace in an entire project, directory-wise.

The condensed solution was
:vimgrep pattern **/*
:cfdo %s/pattern/replaced_pattern/gc

Is this correct? And any idea on how can I map this to a key and add it to my vimrc?
>>
>>58747321
>
JUST this file

>JUST
>>
gg42, 42gg, 42G or :42

?
>>
>>58740341
do you put your gitlab on your resume? I want to make the switch but github is more recognizable to hiring, plus didn't they just lose a ton of data?
>>
Is there some ftp plugin for VIM?
>>
>>58748389
:42
My fav
>>
File: 1480766698916.jpg (124KB, 1080x1920px) Image search: [Google]
1480766698916.jpg
124KB, 1080x1920px
how do i open lots of files in one window as everything was inside one file?

like if i scroll down, the second file is automatically mounted on bottom of the first one etc

i'm writing rather simple programs in c++ to solve computer intensive scientific problems, and they are so simple that two or three split windows are more than enough to work with it efficiently, but in c++ you """should""" keep things in different files, so that kinda ruins my workflow

picture unrelated
>>
>>58748389
42G
>>
>>58743954
I think most modern linux editors do that. Vim and Emacs are from a time where these keybindings weren't established yet, but there are some other editors.
Like gedit, medit, or kate, or geany if you want something with some ide-like features.
Sublime also works on linux if you like that.
>>
>>58748432
Oh fuck was all that downtime last night blowing my shit away

Fuck
>>
Is there any way to move the cursor around in insert mode without using the arrow keys? Would really like to keep my fingers on the home row, but I often find myself pressing C-[ just to move the cursor back a word or up a line or two.

Tangentially, are there any recommended resources for learning vim after vimtutor?
>>
>>58748687
Who that?
>>
>>58749066
bella thorne, follow her on snapchat, she uses vim on her macbook from time to time
>>
>It is included as "vi" with most UNIX systems
Actually the vi on Unix systems is nvi.
>>
>>58749143
>she uses vim on her macbook from time to time
that's so hot
>>
>>58749143
>[hnnngg intensifies]
>>
>>58749143
[citation needed]
>>
>>58742488
can you elaborate on netrw
>>
>>58748389
nmap <cr> G

42 enter
>>
I am editing a .py file, and I have both "syntax on" +
set listchars=tab:\|\<SPACE>

However, my tabs are not like this:
for each in 'ebin':
| print each
| for each in 'benis':
| | print each

but rather blank usual tabs.

What do?
>>
>>58743954
To add to >>58748987, Atom is also an option. It has a pretty good package management system, is easy to configure, and is heavily communtiy-driven. It's comparable to Sublime, however more bloated and much younger.

I tried Atom for about a month before switching back to emacs, but it may be what you're looking for.
>>
>>58742736
let g:airline_powerline_fonts = 1
>>
>>58750386
pls respond
>>
>>58750386
>>58750779
did you
set list

too?
>>
>>58750800
yes
>>
>>58750800
The point is it is working as intended when it is not a .py file, but rather a file without an extension.
>>
>>58740210
https://github.com/metakirby5/codi.vim
Not working on this much anymore but it's the only plugin I've made. Wish I used Python async/pty instead of vim and script so Windows users could be happy.
>>
>>58748687
File mux seems interesting and simple enough, might write one to learn golang
>>
>>58750924
damn that looks really cool man
>>
I know I can run a script with
:!interpreter % <args>

is it then possible to save the output to a file? and how can I make it deal nicely with escape sequences (i.e. colored output)?
Thread posts: 62
Thread images: 7


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.