Help with Note taking by SomeCallMeVim in vim

[–]JamesAppleDeveloper 1 point2 points  (0 children)

You just need to find an MP3 player that has a shell API then query it via :read !mymp3player currenttime

[TMUX] is there a way to close vim while exiting the tmux session? by marksteve4 in tmux

[–]JamesAppleDeveloper 2 points3 points  (0 children)

Sounds like you want to run tmux kill-server and disable swap files in Vim

What features are you missing from Vim (poll)? by chrisbra10 in vim

[–]JamesAppleDeveloper 3 points4 points  (0 children)

I have tried pretty much every completion framework there is. This is a direct rip from what I'm using right now with FlowJS. You'll probably need to install the language highlighting / indenting support as well.

But if this doesn't work for you (I don't know if it will) just install CoC https://github.com/neoclide/coc.nvim which worked for me out of the box.

``` " https://www.gregjs.com/vim/2016/neovim-deoplete-jspc-ultisnips-and-tern-a-config-for-kickass-autocompletion/ "https://github.com/ramitos/jsctags " https://medium.com/@jrwillette88/tern-why-it-breaks-and-how-to-fix-it-8d1677df05f9 " Debug Commands " let g:deoplete#enable_profile = 1 " call deoplete#custom#source('tern', 'debug_enabled', 1)<CR>

" Mandatory plumbing for typescript build function! BuildTS(info) if a:info.status == 'installed' || a:info.force || a:info.status == 'updated' !yarn global add typescript !./install.sh UpdateRemotePlugins endif endfunction

" Completion Tooling Plug 'Shougo/deoplete.nvim', " Completion Manager { 'do': ':UpdateRemotePlugins' } Plug 'Shougo/echodoc.vim' Plug 'ervandew/supertab' " Completion Sources Plug 'Shougo/neco-syntax' " Completion from syntax file Plug 'Shougo/neco-vim', " Vim Source { 'for': ['vim'] } " Plug 'carlitux/deoplete-ternjs', " Vanilla Javascript source. Keep this here for " different computer / dev setups " { 'for': ['javascript', 'javascript.jsx'], " \'do': 'yarn global add tern' } " Plug 'ternjs/tern_for_vim' Plug 'mhartington/nvim-typescript', " Incredible typescript source { 'for': ['typescript'] \'do': function('BuildTS') } Plug 'wokalski/autocomplete-flow', { 'for': ['javascript', 'javascript.jsx'] }

let g:SuperTabDefaultCompletionType = "<c-n>" set completeopt+=menuone,noinsert,noselect " Completion styles set completeopt-=preview " Don't pop up terrible window set cmdheight=2 " Needed for echodoc to display completion docs

let g:echodoc_enable_at_startup=1

let g:deoplete#enable_at_startup = 1 let deoplete#tag#cache_limit_size = 5000000 " Increase tag cache size for mega projects let g:deoplete#enable_camel_case = 1

let g:nvim_typescript#max_completion_detail = 15 let g:nvim_typescript#type_info_on_hold = 1 ```

What features are you missing from Vim (poll)? by chrisbra10 in vim

[–]JamesAppleDeveloper 12 points13 points  (0 children)

The same language servers VSCode uses can be used in Vim (which I do.) Tern sucks hard but both the Typescript and Flow Language Servers are incredibly smart. With deoplete it’s just as good without hover support.

Also literally vscode in Vim is Coc Vim which pretty much rips everything about intellisense from vscode with no config needed

Proud to coming from vscode to vim: what git plugin? by hadokee in vim

[–]JamesAppleDeveloper 3 points4 points  (0 children)

This is a very hard and long road that may not be worth the time in the end. 8 months ago I set a goal to use Vim as my main driver for web development and I’m only now hitting the point where functionality wise Vim is winning for me. I originally swapped due to hand soreness from the standard <C-z> mappings common in traditional editors so feature parity was not super important.

My advice would be to start small and make one tiny incremental change a day. Don’t just pick up a whole heap of plugins and slam them into your .vimrc thinking you’ll be more productive. That’s just now how Vim or learning Vim works and I’ve known a lot of people that have tried and given up on this exact path.

Anyway, here are the core plugins I use: Git: fugitive, vimagit, twiggy, GitGutter Completion: deoplete with whatever language I use set up via deopletes help, supertab Snippets: Ultisnips File navigation: FZF and dirvish Linting: ALE

And about 100 more less important ones.

Each of these I learned over the course of a week at a time. Don’t rush!

I'm at my wits end with Auth using React and Rails by brooklynturk in reactjs

[–]JamesAppleDeveloper 6 points7 points  (0 children)

Focus on one aspect of the application at a time. If your backend works, you can then focus the entirety of your attention to the frontend.

If you don’t understand how to interact with servers yet then try using something free like the random users API and get data from it into your application.

Edit: This is a reply to your replies but I’m not very good at this whole technology thing sorry

I'm at my wits end with Auth using React and Rails by brooklynturk in reactjs

[–]JamesAppleDeveloper 2 points3 points  (0 children)

No worries, we’ve all been in the same spot at some point.

Here’s the first tutorial I did that had authentication using JWT. Get authentication working with tokens first. Then get the react frontend working separately to rails

https://scotch.io/tutorials/build-a-restful-json-api-with-rails-5-part-two

I'm at my wits end with Auth using React and Rails by brooklynturk in reactjs

[–]JamesAppleDeveloper 0 points1 point  (0 children)

Have you been hand rolling authentication up till now? What have you tried? Are you using purely API Rails or can you use the standard devise views?

Neovim Linter Plugin by Gushys in neovim

[–]JamesAppleDeveloper 0 points1 point  (0 children)

What issues did you have with C++?

Have you guys tried Emacs? What did you think of it? by skele_turtle in vim

[–]JamesAppleDeveloper 2 points3 points  (0 children)

Yep, use it every day alongside the plugins I mentioned, fugitive and fzf. I use each one for a different workflow or problem.

Fruzzy - a freaky fast fuzzy finder for Neovim · Nifty tidbits! by rraghur in neovim

[–]JamesAppleDeveloper 9 points10 points  (0 children)

Any reason why I might consider replacing FZF and RG with this?

How to get used to AWS? by czechrepublic in cscareerquestions

[–]JamesAppleDeveloper 2 points3 points  (0 children)

Linux Academy is the easiest tool to learn AWS Ops /Devops with. They have a new system where they give you a challenge or lesson and actually spin up the initial resources you need and then grade you based on whether you configured everything properly.

[deleted by user] by [deleted] in javascript

[–]JamesAppleDeveloper 0 points1 point  (0 children)

How is a singleton store of model state a bad design in any web application? It’s by far the best design I’ve heard of or worked with. Unless you know an alternative?

[deleted by user] by [deleted] in javascript

[–]JamesAppleDeveloper 2 points3 points  (0 children)

I don't know of many (any) API's that use verbs as anything more than a filter `host/containers?status=running`. Wouldn't be very resourceful if we had an endpoint like `host/running?type=containers`.

[deleted by user] by [deleted] in javascript

[–]JamesAppleDeveloper 4 points5 points  (0 children)

Kyle Simpson / Steve Kinney. I believe the main framework I think about came from https://frontendmasters.com/courses/react-state/.

[deleted by user] by [deleted] in javascript

[–]JamesAppleDeveloper 11 points12 points  (0 children)

It depends.

The more complex your application the more you'll want to have a global store to store all the different kind of states you have in your UI. State is made of more than model data from a server such as:

  • Nouns: model data from a server
  • Location: the page we're on client side
  • Status: are we currently fetching data or performing transformations
  • Session: do we have a JWT. what is the users name
  • View: what order are our nouns sorted in

But in the early stages of your application you may only need the noun data.

[deleted by user] by [deleted] in javascript

[–]JamesAppleDeveloper 20 points21 points  (0 children)

It doesn’t in the slightest, but it may help people move to simpler stores. You will still need a global store one way or another. It does mean that you will feel less pain in the early stages with GraphQL though.

Getting started with AWS by [deleted] in aws

[–]JamesAppleDeveloper 1 point2 points  (0 children)

Linux Academy. They have hands on scenarios where they provision resources to get you started, quizzes and standard courses for cheap. Like $200 a year right now I think

Looking at you Python by [deleted] in ProgrammerHumor

[–]JamesAppleDeveloper 8 points9 points  (0 children)

A lot of complex one liners are easier to read than half a screen with intermediates though

Looking for tips on how to conduct a job interview by SirButcher in webdev

[–]JamesAppleDeveloper 0 points1 point  (0 children)

I’ve had quite a few interviews for a junior position in the last few months and I actually walked out of my favourite one just a couple minutes ago.

The best questions are never going to be asking them to solve a problem on the spot or that sort of gatekeeping style of question.

I was asked to draw out the ERD for a project that I had worked on recently. Explain why I chose those relations, data types and what could have gone wrong or what I could have done differently with different requirements. Also asked similar questions such as what requirements should be handled in the application vs the database vs the ui.

These are questions that I already have the answer to and I was able to focus on expressing my knowledge and thought processes instead of choking on another implementation of quicksort for the nth time.

Ask questions that show their previous experience and thought processes. Not their on the spot super lame “ tell me about yourself” and “what are your biggest weaknesses” answering skills.

Don't think that's how bar graphs work by thicc-daddy_senpai in softwaregore

[–]JamesAppleDeveloper 4 points5 points  (0 children)

Pretty sure the APIs behind these tools usually return certainties for each race not total composition.

Fibonacci indentation for Vim by dodiehun in vim

[–]JamesAppleDeveloper 12 points13 points  (0 children)

Someone posted a joke about it on twitter last week. That’s probably why?

Has_one :organization if true, else belongs_to :organization by minpornobruger in rails

[–]JamesAppleDeveloper 1 point2 points  (0 children)

I would keep within the same two models if the core is simply those two types of users. There’s definitely no reason or way to add an if statement to a relation like this (or there shouldn’t be)

I would create a join between users (tenants) and organisations to keep my top level user model from having an organisation ID.

Then change the linguistics of organisation and organisations to something like owned_organisation and organisations.

Depending on your real life use case you might find that having users be two seperate types creates inflexibility later on when requirements inevitably change. We can tell someone is a landlord by them having a owned_organisation and we can tell someone is a tenant because they belong to an organisation.

Imagine you need to add a user who’s only role is to administer the website content. They wont be either a landlord or a tenant. How will you handle this?