Cursor is a modern code editor that is designed to be more efficient and productive. It is built on the same technology as VSCode, but with a focus on providing a more seamless and intuitive coding experience.About Cursor AI editor, after few weeks of reviewing, my conclusion is it provides way more helpful features to FE engineers than github co-pilot:
- It provides better LLM options, Claude 3.5 sonnet is way better than ChatGPT about coding, there might be other better options in the future so I think Cursor (3rd party tool) is better than github co-pilot (partner with openAI)
- It provides full section replacement feature which is far better for daily development than VSCode's autocomplete, VSCode might need extra time to catch up.
- Cursor can let AI handles multiple files in the same time and it's crazy useful when we want AI edit one file but follow another file's rule, VSCode might need extra time to catch up also.
2 and 3 increase the usefulness of AI from 2% to 15% (base on lines it helped), so I think I'm very sure it's a useful tool.
I recommend we cover its subscription fee by company expense 🙏 from FE's perspective.
After we push this tool to All FE engineers, I'm very confident that we already could reduce points for certain type of tasks.
- open
pages/case1.vue
- move cursor to end of
fruits
- try add watermelon by typing
w
, it should autocomplete - there better part is, it will also fix previous line by adding
,
, this is because Cursor able to replace whole section instead only ongoing line.
- open
.env
- paste following to
.env
VITE_IDENTITY_URL=https://idp.local.tripla.ai
VITE_IDENTITY_KEY=test-xxxx-zzzz-9269-a628de3062e2
VITE_IDENTITY_SECRET=test-yyyy-zzzz-b5b9-8169924e57ac
- select all text and press
command + k
- select
fix with command K
, tell itI want NUXT
- accept and done
- open
.env.production
- paste following to
.env.production
VITE_IDENTITY_URL=https://idp.tripla.ai
VITE_IDENTITY_KEY=live-2222-4444-9269-a628de3062e2
VITE_IDENTITY_SECRET=live-3333-4444-b5b9-8169924e57ac
- move cursor to end of
VITE_IDENTITY_URL
line - wait autocomplete popup, it should fix all three lines with
NUXT_
prefix - accept and done
- open Composer by
command + i
- press
@prompts
and chooseguideline1
to attach to Composer - press
@
and attachpages/case1.vue
to Composer - ask it fix
pages/case1.vue
- accept and done
Look at the Nuxt documentation to learn more.
Make sure to install dependencies:
# npm
npm install
# pnpm
pnpm install
# yarn
yarn install
# bun
bun install
Start the development server on http://localhost:3000
:
# npm
npm run dev
# pnpm
pnpm dev
# yarn
yarn dev
# bun
bun run dev
Build the application for production:
# npm
npm run build
# pnpm
pnpm build
# yarn
yarn build
# bun
bun run build
Locally preview production build:
# npm
npm run preview
# pnpm
pnpm preview
# yarn
yarn preview
# bun
bun run preview
Check out the deployment documentation for more information.