This paper presents a new control topology to enable effective integration of voltage source converters (VSCs) in weak grids. The controller has two main parts. The first part is a linear power-damping and synchronizing controller which automatically synchronizes a VSC to a grid by providing damping and synchronizing power components, and enables effective full power injection even under very weak grid conditions. The controller adopts cascaded angle, frequency and power loops for frequency and angle regulation. The controller emulates the dynamic performance of synchronous machines, which eases grid integration and provides a virtual inertia control framework for VSCs to damp power and frequency oscillations. Although the linear controller offers stable and smooth operation in many cases, it cannot ensure system stability in weak grids, where sudden large disturbances rapidly drift system dynamics to the nonlinear region. To overcome this difficulty, a supplementary nonlinear controller is developed to assist the linear controller and enhance system performance under large-signal nonlinear disturbances, such as self-synchronization, disturbances in grid frequency and angle, high power injection in very weak grids and fault-ride-through conditions.